Regarding the proposed Binray Literals Deprecation
Adam D Ruppe
destructionator at gmail.com
Sat Sep 10 02:38:33 UTC 2022
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. That's objectively not a big deal but
subjectively proves to be a barrier to adoption.
(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.)
> The downside is the language gets bigger and more complex
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.
> and people who don't come from a C background wonder why their
> 093 integer isn't 93.
This is a completely separate issue that nobody is talking about
changing here. While I'd love for it to be good, it is probably
practical to keep a deprecation in place so the C programmers can
be educated.
> 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.
> 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?
More information about the Digitalmars-d
mailing list