"body" keyword is unnecessary

Ary Manzana ary at esperanto.org.ar
Thu Mar 24 19:02:34 PDT 2011


On 3/24/11 4:02 AM, Bekenn wrote:
> Interestingly, you don't even have to remove "body" from the syntax to
> remove it as a keyword, as it's only used in this context (that I know
> of), where no other symbols make sense.

And oh so many keywords could be removed from the language if the 
compiler is smarter...

I was really amazed when I found out public, protected and private are 
methods in Ruby, not keywords. In fact, I don't know if a concept like 
keyword exists in Ruby... and this is soooo good... I use the name 
"body" for an HTTP response.

At all times, every compiler writer should take this into account:

"When we discovered Ruby, we realized that we’d found what we’d been 
looking for. More than any other language with which we have worked, 
Ruby stays out of your way. You can concentrate on solving the problem 
at hand, instead of struggling with compiler and language issues. That’s 
how it can help you become a better programmer: by giving you the chance 
to spend your time creating solutions for your users, not for the compiler.”


More information about the Digitalmars-d mailing list