Why is std.algorithm so complicated to use?

Tobias Pankrath tobias at pankrath.net
Tue Jul 10 13:07:51 PDT 2012


>
> Given:
>
> @property int delegate() foo(){ ... }
> @property int bar(){ ... }
> int baz(){ ... }
>
> foo(); // calls the delegate.
> bar(); // illegal
> baz;   // ok, call baz
>
> dmd -property gets every single one of these wrong. -property 
> does _not_
> enforce @property semantics. It only adds a silly rule that was 
> never
> part of the @property design. I am astonished that it made it 
> into the
> compiler.

+1


More information about the Digitalmars-d mailing list