Look and think good things about D

Ary Borenszweig ary at esperanto.org.ar
Fri Nov 15 07:20:19 PST 2013


On 11/15/13 11:39 AM, Chris wrote:
> Well, that was exactly my point. As a human being you don't need the
> patronizing (and highly annoying) "for every number ...". This is what
> you say when you explain it to a newbie. But there is no need to spell
> this out in the syntax. Syntax of programming languages is (or should
> be) like road signs, or any other signs. Concise and expressive. Else,
> what's the point? I know that languages like Lua have the philosophy
> that non-programmers should be able to use it. But every human being is
> capable of abstracting things. There is no need for this terrible syntax
>
> (2..max).each do:
>
> end

No need to do that. You can, if you want to. I would have done:

2.upto(max) do
   ...
end

>
> It doesn't add anything to the code except for useless characters.

What do you mean by useless characters? How do you do it in D?


More information about the Digitalmars-d mailing list