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

"So Lisp, even with macros, is not that bad."

Agreed in the general sense, which is why I chose Python for my example, for clearer contrast.

I would say there's still a qualitative difference between languages where there is some well-defined, concrete procedure where you can take a line of source code and resolve exactly what it is doing, and a language where said resolution of what it is doing involves arbitrary code execution between the source code and what the code is actually doing. Python is frankly insane in some ways, but you really only need one place where arbitrary code is being invoked, and I mean this in the nicest of ways but Lisp programmers are fully capable of driving a truck through even that one particular hole.



Common Lisp implementations have the same procedure: you do MACROEXPAND or MACROEXPAND-ALL on the code, and boom, there's the code that says exactly what it does.

What you probably mean there is you want some abbreviation or specification for what the code does without having to expand it. It's not clear to me how this could work with all the things (like preprocessors or code generators) that macros can replace. Maybe you want a standardized API where the macro, in addition to computing the expansion, also delivers some sort of specification of what the expansion is doing? Or maybe you just are asking that macros be documented, like any built-in language feature?

Questions like this, I find, are best addressed by drilling down and asking for specifics about what you need.




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

Search: