Just where has this language gone wrong?

Christophe Travert travert at phare.normalesup.org
Thu Jul 19 07:44:20 PDT 2012


"Petr Janda" , dans le message (digitalmars.D:172727), a écrit :
> On Thursday, 19 July 2012 at 14:31:53 UTC, 
> travert at phare.normalesup.org (Christophe Travert) wrote:
>> "q66" , dans le message (digitalmars.D:172716), a écrit :
>>> (so instead of calling a(b(c(d(e(f))))) you can just call 
>>> a.b.c.d.e.f())
>>
>> rather f.e.d.c.b.a, if you omit the empty parenthesis after 
>> each letter
>> (but f).
> 
> Ok, but the empty parenthesis is is important, it tells you about 
> whether it's a an object or a function.
> 
> It's another thing I hate about Ruby is that a parenthesis 
> enforcement is weak.

property (functions that behaves like fields) don't require 
empty parenthesis. This feature has been extended to all function, 
leading to the current situation. Some people would like this to 
disappear, and enforce strict property. To take the function object, and 
not its result, take its adress.
f == f() : the result
&f : the function.

Indeed, by looking at f, you can't tell if it is a function or an 
object. You can never tell much when you see an isolated symbol...


More information about the Digitalmars-d mailing list