const member function synatx?
Moritz Warning
moritzwarning at _nospam_web.de
Fri Mar 7 15:53:17 PST 2008
On Wed, 05 Mar 2008 05:40:32 -0500, renoX wrote:
> im Wrote:
[snip]
>
> If D used Limbo and Scala syntax for this <function
> name>(<parameters>):<return value> then there would be no ambiguity:
> const memberFunc(param): ReturnType {} memberFunc(param): const
> ReturnType {} const memberFunc(param): const ReturnType {}
>
> Walter has chosen an inferior syntax in the name of programmers
> familiarity, this is unlikely to change..
>
> renoX
That syntax would be nicer indeed.
We may be able to omit the void return type this way:
"print()" instead of "void print()"
I personally prefer to move the return type into the function header,
but that's another pile of issues.
More information about the Digitalmars-d
mailing list