M
Marko Rauhamaa
Steven D'Aprano said:And what a wonderful day that will be! Reading any piece of code you
didn't write yourself -- or wrote a long time ago -- will be an
adventure! Every script will have it's own exciting new set of
keywords doing who knows what, which makes every script nearly it's
own language! Oh joy, I cannot wait!
That's sarcasm, by the way.
I don't hear Lispers or C programmers complaining. Yes, you can shoot
yourself in the foot with macro trickery, but macros can greatly enhance
code readability and remove the need for code generators. That's why
they are used extensively in Linux kernel code and GOOPS (Guile's object
system), for example.
Then I can write code like:
for for in in:
while while:
if if:
raise raise
which will go a long way to ensuring that my code is an hostile and
unreadable as possible.
Perl does that by forcing you to prefix you variables with $ et al. The
analogy would be:
for $for in @in:
while $while:
if $if:
raise $raise
I'm not saying I like the look of that, but it does have a distinct
advantage in introducing new keywords.
Marko