[erlang-questions] Orthogonality and Principle of least surprise Was: chained functions

Richard O'Keefe ok@REDACTED
Thu Feb 2 05:33:49 CET 2012


On 1/02/2012, at 9:05 PM, Jakob Praher wrote:
> No matter that the following may be a syntactic surface issue, but designating function objects is neither orthogonal nor does follow the expectations of the programmer. Therefore it also makes understanding code harder.
> 
> if I can write:
>     module:fun().
> I should be also able to write
>     F = module:fun, F().
> and not having to write
>     F = fun module:fun/0, F().
> .
> 
> I am happy to learn why module:fun is not an expression.

Because it would be ambiguous.





More information about the erlang-questions mailing list