Fixing const arrays

Jakob Ovrum jakobovrum at gmail.com
Mon Dec 12 04:38:09 PST 2011


On Monday, 12 December 2011 at 12:24:53 UTC, torhu wrote:
> On 11.12.2011 22:24, Jonathan M Davis wrote:
> ...
>> It was debated some time ago, and it ended up being a 
>> property. The fact that
>> save is an action verb and not a noun automatically 
>> disqualifies it as a
>> property IMHO, but it was made into a property, and we're 
>> pretty much stuck
>> with it at some point. As far as what the function does, I 
>> don't think that
>> it's a problem that it's a property, but it's not named like a 
>> property, so
>> the situation with regards to save is not ideal, but it's too 
>> late now.
>
> I really don't get this.  When D has 10,000 programmers using 
> it professionally, it's too late.  But now it's more like 5 or 
> 10.  And they are all presumably aware that D2 is still 
> undergoing some polish. So are the maybe a few hundred people 
> that are using D for hobby projects.  They are early adopters, 
> and they know what that entails.  I call bogus on the backwards 
> compatibility argument.  There's not a lot to be compatible 
> with at this stage.  Not compared to what D2 wants to become.
>
> As for Andrei's book using save with the parentheses:  If D2 
> gains traction, I'm sure there will be a second edition of that 
> book.  And you already want to have the errata handy when using 
> the book.  I don't see what the big deal is, at least not 
> compared to letting this stay in the language forever.
>
> save being a property is a stupid inconsistency.  It's easy to 
> fix, the cost is relatively low.  The people using D2 now are 
> all part of a community that want D to succeed, as am I. It's a 
> change for the better, which I'm sure most current D2 users 
> would agree with.  How hard can it be?

Furthermore, there weren't even a way to enforce the property 
syntax until lately, and it's still not enabled by default. If we 
change it right now, people still have time to adapt before the 
backwards-compatibility argument even kicks in (no matter how 
weak it is).


More information about the Digitalmars-d mailing list