[dmd-beta] dmd 2.064 beta take 2
Don Clugston
dclugston at gmail.com
Wed May 15 22:46:23 PDT 2013
On 15 May 2013 23:19, Andrei Alexandrescu <andrei at erdani.com> wrote:
> On 5/15/13 5:14 PM, Walter Bright wrote:
>
>> It means I can't read the code and easily determine what that const
>> value is, even though it is explicitly initialized with a value.
>>
>
> I now understand the concern. I'd argue that static immutable/const
> fulfills that role, and that a member const is supposed to be initialized
> in a constructor (or via the default initializer syntax as for any other
> member) and stay constant throughout the lifetime of the object. That _is_
> a very useful notion.
>
> I'm not assuming you're proposing this, but I'm clarifying just in case: a
> member that takes per-instance memory YET always has the same value in all
> objects would be positively useless. _That_ should at best be an error.
>
Great! This is exactly my argument. In that case we are actually in
agreement. Thats the case I want to disallow.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-beta/attachments/20130516/9fbf26ef/attachment.html>
More information about the dmd-beta
mailing list