Re: Lambda Concise method and void return type

2018-09-30 Thread Tagir Valeev
Hello! I don't think that `void foo() -> null` should be supported. Like in lambdas if the method returns void, only expressions which can be used as expression statement should be allowed. I don't think that special support for empty bodies is necessary as {} is short enough. Especially if your

Lambda Concise method and void return type

2018-09-30 Thread Remi Forax
Testing the prototype, i've seen myself using -> null instead of a classical empty method body when i want to have a method that does nothing. class A { void f() -> null; // versus void f() { } } the compiler translates the concise version to aconst_null pop return instead of a plain

Concise method / method reference

2018-09-30 Thread Remi Forax
Hi all, i've played a little bit with the concise method prototype. i think that using '=' to 'assign' a method reference to a method signature - is visually too close to a field assignment. - send the wrong message because there is no assignment at runtime. A way to avoid the issue listed above