null references redux + Looney Tunes
Jeremie Pelletier
jeremiep at gmail.com
Sun Oct 4 08:47:11 PDT 2009
language_fan wrote:
> On Sun, 04 Oct 2009 11:51:13 +0200, Lutger wrote:
>
>> How do you think Scala is going to manage to be a popular alternative
>> for Java by requiring its user to read books about lambda calculus?
>
> It's not necessary. Often removing extra semicolons and changing the form
> '<type> <value>' to '<value> : <type>' suffices. Especially when porting
> Java code.
>> The keyword metric is so flawed you just cannot base any argument around
>> it.
>
> I admitted that later. Some of the keywords have a strong justification
> behind them. Others feel irritatingly unnecessary.
I would rather have many different specialized keywords than a few
keywords with many different meanings. Its *much* easier to remember a
large set of simple words than a small set of complex words.
> Imagine if D had keywords goto_unknown, goto_forward and goto_backward,
> and goto_here (which is rewritten as while(true) {} by the compiler),
> based on how the program counter will change. Jumps to addresses with a
> lower program counter value use goto_backward, vice versa for
> goto_forward. Situations where the pc value is runtime determined would
> have to use goto_unknown. D 2.0 would also have construct 'goto dynamic
> (addr);' which would behave identically to 'goto_unknown addr;'. Now some
> of you might see a pattern here and would try to combine the various
> gotos into a single keyword. I am talking about similar situation, but my
> focus is on a higher level.
I can't make sense out of this example, since there's only one possible
goto with current hardware, and even VMs don't care where you jump at.
I think you meant to say that we can generalize keywords and let the
compiler decide what we meant to do. And that is not always a good
thing, sometimes you want your keyword to be verbose to other
programmers too, for example the recent discussion about casts which
stated D should have support for explicit static, dynamic and
reinterpret casts just like C++.
More information about the Digitalmars-d
mailing list