http://d.puremagic.com/issues/show_bug.cgi?id=7176



--- Comment #18 from timon.g...@gmx.ch 2013-03-20 13:33:49 PDT ---
(In reply to comment #17)
> I don't like this feature. Because:
> 
> 1. it would reduce code readability.
> 

On the contrary! It also increases language consistency.

>    class LibClass {
>      int foo() { return 1; }
>      string bar() => "hi";
>    }
> 
>    Mixing lambda syntax and normal function syntax looks messy.
> 

No. It is normal function syntax that looks messy in this case.

class LibClass {
    auto foo() => 1;
    auto bar() => "hi";
}


> 2. Just only reducing 7 character is too small benefit.
> 

7*_N_ characters. Also, it can get rid of additional indentation.

>    auto foo()=>expr;
>    auto foo(){return expr;}
> 
>    With more complex function signature:
> 
>    ComplexReturnType!(..) foo(T, U, V)(T t, U u, V v) if (...)=>expr;
>    ComplexReturnType!(..) foo(T, U, V)(T t, U u, V v) if (...){return expr;}
> 
>    Ratio will fall further.

This is not a valid argument in any case.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to