Regarding the proposed Binray Literals Deprecation

Walter Bright newshound2 at digitalmars.com
Sat Sep 10 05:58:25 UTC 2022


On 9/9/2022 7:38 PM, Adam D Ruppe wrote:
> On Saturday, 10 September 2022 at 02:17:30 UTC, Walter Bright wrote:
>> octal!433 is really not much different from 0433. It could even be shortened 
>> to o!433, exactly the same number of characters as 0o433.
> 
> You snipped the relevant point about having to change context to add the import.

I normally do not quote everything. I'm not trying to hide the import thing, I 
just don't attach much importance to it.


> That's objectively not a big deal but subjectively proves to be a barrier to 
> adoption.

If you're using octal a lot, it is worth it.


> (I do think it would be a bit better too if it was `core.octal` instead of 
> `std.conv` so it brings in a bit less baggage too.)

It's not really a core feature, but std.octal would be better.


> The question of bigger languages is with interaction between features. Octal 
> literals are about the most trivial addition you can do since it doesn't 
> interact with anything else.

It does, as 093 doesn't work as non-C programmers would expect.


>> Nobody would ever write that unless they used octal exactly once
> This is demonstrably untrue. Local imports are common in D, even when used 
> repeatedly.

While I like that D can do things like that, it's not a great style, because it 
wouldn't be discovered with grep (i.e. obfuscates what things are imported).


>> Let's simplify D.
> This doesn't achieve anything. If you carry on with this path, you're gonna 
> force a fork of the language. Is that what you want?

Do you really want to use the nuclear option over octal literals?

It really bothers me why so many discussions head down this path. Let's please 
try and keep the voltage down.


More information about the Digitalmars-d mailing list