elvis pattern refinement (was Syntax patterns)

Ali Ebrahimi ali.ebrahimi1781 at gmail.com
Fri Apr 24 10:44:55 PDT 2009


My Idea for this proposal:

result = a!.method():b;

Null-Safe Call Operator: !.
return type a.method() and type of var b is assignable to result.

equivalents with :

if( a!= null){
    result = a.method();
} else{
    result =b;
}

*Or

result = a != null? a.method(): b;


Best Regards
Ali Ebrahimi
*



More information about the coin-dev mailing list