[Pas2js] lambda keyword feature request

warleyalex warleyalex at yahoo.com.br
Sun Jan 21 04:07:15 CET 2018


It would really nice Pas2JS introduce the Lambda syntax, the lambda
expression syntax is similar to C# syntax with "lambda" keyword in front to
make it less of an operator soup.

something like

DoSomething(
   lambda (param1, param2: String): String
      DoSomethingElse(param1);
      Result := ComputeSomething(param2);
   end,
   lambda(err: JSValue)
       WriteLn(err);
   end);

Lambdas are currently capable of compile-time type-inference, ie. they are
strongly-typed and can be used as less verbose alternatives to the
“anonymous methods” syntax.




--
Sent from: http://pas2js.38893.n8.nabble.com/


More information about the Pas2js mailing list