Should I prefer immutable or const?

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Nov 2 18:04:47 PDT 2016


On Wednesday, November 02, 2016 23:23:22 Nordlöw via Digitalmars-d-learn 
wrote:
> On Tuesday, 1 November 2016 at 18:55:26 UTC, Jonathan M Davis
>
> wrote:
> > - Jonathan M Davis
>
> Thanks. I'll go for immutable, when possible, then.
>
> I wish I had a shorter way to write immutable, though :)
>
> Do you think it would be possible to adopt Rust's syntax `let`?

I'm not very familiar with rust, so I don't know, but in general, at this
point, you'd need a pretty solid argument why a syntactic change to the
language was a big improvement, or it wouldn't happen. It also would likely
require that someone put in the time and effort to produce a solid DIP in
favor of it, and from how Andrei has been responding to DIP-related stuff of
late, it sounds like he and Walter are setting the bar very high right now.
And I'd guess that simply not liking how many characters it takes to type
immutable is nowhere near a sufficient reason to get anything changed. But
maybe a solid DIP would stand a chance. I don't know.

- Jonathan M Davis




More information about the Digitalmars-d-learn mailing list