Is the world coming to an end?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Apr 3 08:43:32 PDT 2011


On 4/3/11 4:39 AM, Ulrik Mikaelsson wrote:
> 2011/4/3 Walter Bright<newshound2 at digitalmars.com>:
>>
>> The 0x notation is heavily used, and so justifies a custom syntax for it.
>> Octal is pretty much never used outside of setting file permission masks.
>
> The thing is, since you already have 0x and 0b, 0o would not be much
> of a "custom syntax". It would simply be an "extrapolation of the
> rule". It follows the already set pattern for non 10-base literals.

It is a custom syntax nevertheless. Worse, that custom syntax does 
nothing for other cases of literals (e.g. lat/long, degrees and minutes 
etc). The best thing about std.conv.octal is that is serves as a 
template (in the general sense of the word) for any custom literals. It 
offers the proverbial fishing rod as opposed to '0o' being the 
proverbial fish.

> Regarding the "but it's so uncommon"-argument, there are 23 characters
> left for the "0<base-char>"-notation, there isn't exactly an
> allocation-problem.
>
>> A feature that can be handled adequately by the library should not be part of the core language.
> If you're looking for uncommonly used language-features that could
> easily be otherwise solved, go ahead and remove asm instead. I'll
> guess it's about as uncommon as octal literals (or maybe even more),
> have simple other solution (just compile it separately and link), and
> has much greater impact on the language and the compiler.
>
> I simply don't buy the "uncommon" argument, when it's such a minuscule
> thing in the language, following an already established
> framework/pattern.
>
>> The phrase "discriminating against people" has a lot of emotional baggage associated with it that is irrelevant to this.
> Walter, you can make the decisions you see fit, you are the BDFL, but
> please don't dismiss peoples feelings like this. It will only hinder D
> longevity and growth.
>
> I realize the discussion is over, and the feature has been
> implemented. Bitching and moaning now won't change anybodys mind, but
> for the record, I think this is a bad design-move, breaking
> established patterns. I agree it minuscule and seldom used, so I'm not
> going to continue the discussion.

On the contrary, I think it's a very good and significant move in the 
right direction. If it breaks anything, it breaks an inferior approach 
to literals.


Andrei


More information about the Digitalmars-d mailing list