static property without return type
Andrej Mitrovic
andrej.mitrovich at gmail.com
Sat Mar 16 18:06:08 PDT 2013
On 3/17/13, Timon Gehr <timon.gehr at gmx.ch> wrote:
> No, if the return type is missing, it is deduced.
What are you talking about? You can't write:
foo() { return 0; }
> 'auto' does not mean type deduction! It's a crutch for the parser. In
> fact, the meaning of 'auto' is basically carried over unchanged from C.
auto means something completely different in C.
> Requiring 'auto' would be inconsistent.
It's required without 'static/@safe/@property/pure' and other
attributes, it's completely pointless that adding any of these should
allow you to avoid specifying the return type.
More information about the Digitalmars-d
mailing list