const/immutable member functions

Kagamin spam at here.lot
Wed Jan 26 02:02:01 PST 2011


foobar Wrote:

> This "problem" happens because D belongs to the C-family of languages which puts the return type _before_ the function name.
> 
> Languages that don't follow this syntactic convention (some would call it a mistake) have it very consistent and readable: 
> attribute funcName inputParams -> outputParams { body }

ReturnType funcAttributes funcName(params) { body }

BTW the problem is in separation of function attributes from return type attributes. I'm afraid, your example doesn't solve it.


More information about the Digitalmars-d mailing list