Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

There's no need to 'emulate' anything 'via code-walking' and 'heuristics' when writing Lisp macros. This is a personal use case of your own.

If you know how to write Lisp macros(i.e. experience) then they will be correct. Not all Lisp macros are trivial to implement even for the experienced Lisp hacker. Writing a Lisp macro requires testing and debugging. The difference is that Lisp inserts no 'airbags' between the language and the programmer. They are very powerful but you may 'hurt' yourself.



> If you know how to write Lisp macros(i.e. experience) then they will be correct.

Is this the same argument as 'C is an insecure language only if you are a bad C programmer'?


No. The statement simply means that experience is important. The same holds for any language that you use.


I don't understand what 'airbags' haskell inserts. Ok, it might be a bit trickier to write macros since it doesn't have such uniform syntax, but can you not still express all of the same meta-programming constructs?


The issue comes when transforming entire expressions; what parts are code to transform, and what parts are data? You can't know, you have to guess.


There is no guessing. You get to answer that question for yourself based on the context of your application. Many Lisps provide as much(or as little) type checking that you might want in your application.


OK, and now we've hit on the main problem I've had with Common Lisp -- every library thinks it's the only library in the universe, and they don't compose well. Your comment exactly expresses the attitude of the Common Lisp community (as I see it) -- "you should write every single line of code in your app from scratch, just for you".

No thanks. The less code I have to write, the better.


It seems that you have a beef with a particular(or multiple) Common Lisp libraries. Fair enough.

However, I never said that you should write every line of code in your app from scratch. I did say that you should OWN the decisions for YOUR app. I believe that this more accurately describes the attitude of the CL community (and that of many other languages too).

My point was that meta-programming is more powerful in Lisp than Haskell(as far as I'm aware). That's pretty much it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: