Is const to ease programming or compiling multicore?
Neil Vice
sardonicpresence at gmail.com
Sun Mar 30 19:42:39 PDT 2008
"Georg Wrede" <georg at nospam.org> wrote in message
news:47F04DD4.8020803 at nospam.org...
> I'm not sure if the current way const is heading is for better (read, more
> productive, i.e. safer and /faster/ ) programming, or if it is for better
> compiler omtimizability in a multithread+multiprocessor setting,
> forgetting the poor programmer.
I personally see the primary reason for const as the former and I think D2
is beginning to do that very well.
I think as far as compiler optimisation goes, any declarations that state
what can & can't happen to variables has the potential to be valuable. As
such, provided there is also an advantage to the programmer and as such is
not simply an inconvenience, declarations of this nature are desirable to
include.
> Of course, the holy grail would be getting both, but I'm not so sure that
> is even within reachability of D2. Maybe D3, though? In that case should
> we try to get there one step at a time? But then, where should we draw the
> line on how far we try to get with D2?
I see D2 as achieving more the safer programming aspect than the
multiprocessor optimisation. I suspect that much more is required to achieve
the latter but as I say, every little declaration helps =)
More information about the Digitalmars-d
mailing list