[Issue 5251] Const C file

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 22 10:31:24 PST 2010


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


nfxjfg at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nfxjfg at gmail.com


--- Comment #5 from nfxjfg at gmail.com 2010-11-22 10:30:04 PST ---
(In reply to comment #3)
> What you are looking for is head-const (the variable cannot change, but
> everything it points to can), which has some good uses, but does not exist in
> D.

It exists to some degree in D1:

final int[] a = [1,2];
a[0] = 1;  //works
a = [5,6]; //Error: cannot modify final variable 'a'

Apparently this was disabled in D2.

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


More information about the Digitalmars-d-bugs mailing list