On Thursday, 4 January 2018 at 13:52:14 UTC, Mark wrote:
You ma find Ali Cehreli's talk from DConf 2013 [1] useful. It
includes some guidelines (basically recommendations) on how to
use immutable and const.
Same topic and same mentor here, but in text form:
http://ddili.org/ders/d.en/const_and
On Wednesday, 3 January 2018 at 17:27:38 UTC, Marc wrote:
for a safe programming, since C/C++ times I try to make thing
const as possible. locals, parameters etc anything which isn't
going to change.
How do you do that in D? immutable everywhere?
for example:
foreach(Field field; fie
On 1/3/18 12:27 PM, Marc wrote:
for a safe programming, since C/C++ times I try to make thing const as
possible. locals, parameters etc anything which isn't going to change.
How do you do that in D? immutable everywhere?
For parameters, I'd recommend const, not immutable, as const allows more
On Wednesday, January 03, 2018 17:27:38 Marc via Digitalmars-d-learn wrote:
> for a safe programming, since C/C++ times I try to make thing
> const as possible. locals, parameters etc anything which isn't
> going to change.
> How do you do that in D? immutable everywhere?
>
> for example:
> > forea
for a safe programming, since C/C++ times I try to make thing
const as possible. locals, parameters etc anything which isn't
going to change.
How do you do that in D? immutable everywhere?
for example:
foreach(Field field; fields) {
immutable string htmlOutputfile = ge