Re: Interested in D, spec confuses me.

2016-02-02 Thread Bambi via Digitalmars-d
On Tuesday, 2 February 2016 at 15:48:02 UTC, anonymous wrote: "immutable" is not a homonym here. It means the same thing ("cannot ever change"). And it's not redundant either, as the two instances apply to different targets. It's clear what the first "immutable" ties to: It qualifies the

Re: Interested in D, spec confuses me.

2016-02-03 Thread Bambi via Digitalmars-d
On Tuesday, 2 February 2016 at 23:41:07 UTC, H. S. Teoh wrote: You're misunderstanding D's type system. Immutable is not a "better const", as though const is somehow defective. Perhaps the following diagram may help to clear things up: const / \

Re: Interested in D, spec confuses me.

2016-02-03 Thread Bambi via Digitalmars-d
On Wednesday, 3 February 2016 at 12:12:03 UTC, Kagamin wrote: Immutability provides stronger guarantee that allows more optimizations, e.g. reading the same immutable value is known to result in the same value so such repeated reading can be optimized out, in C such optimization is illegal,

Interested in D, spec confuses me.

2016-02-02 Thread Bambi via Digitalmars-d
I have to disclaim that I am not a very good programmer, and I am doing this on a hobby level. I'm reading through the spec because D seems to be a very interesting language that affords lower level control than say C# without the syntactical mess of C++. A few things confuse me a lot. 1.