optional (), what is done elsewhere

Timon Gehr timon.gehr at gmx.ch
Mon Feb 4 07:17:55 PST 2013


On 02/04/2013 04:34 AM, deadalnix wrote:
> ...
>
> 2/ Scala.
>
> In scala, the method name is evaluated to the method itself. If this
> ends up being a NOOP, then the function is evaluated. See example below :
> ...

That is an inaccurate description of how it works. Methods are called 
implicitly unless they:

1. Are called explicitly.
2. They are suffixed with _.
3.-n. They occur in a context where a parameter-less function is 
explicitly requested.

>
> It seems that none does what D try to achieve.

Play around with Scala some more. It does everything D tries to achieve 
regarding implicit calls, and more.


More information about the Digitalmars-d mailing list