Regarding the proposed Binray Literals Deprecation

Preetpal preetpal.sohal at gmail.com
Sat Sep 17 22:11:35 UTC 2022


On Saturday, 17 September 2022 at 21:57:41 UTC, Preetpal wrote:
> On Saturday, 17 September 2022 at 21:39:59 UTC, Walter Bright 
> wrote:
>> On 9/17/2022 10:22 AM, Loara wrote:
>>> The point is that a lot of people comes from C/C++ and 
>>> they're used to use binary literals
>>
>> Not really. C11 doesn't have binary literals. C++ added them 
>> quite recently.
>
> FWIW, 
> [C#](https://devblogs.microsoft.com/dotnet/new-features-in-c-7-0/#literal-improvements), [Java](https://docs.oracle.com/javase/8/docs/technotes/guides/language/binary-literals.html), [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Numbers_and_dates#binary_numbers), [Python](https://docs.python.org/3/reference/lexical_analysis.html#integer-literals) and [Ruby](https://ruby-doc.org/core-3.1.2/doc/syntax/literals_rdoc.html#label-Integer+Literals) all have binary literals.

Also, [Emacs 
Lisp](https://www.gnu.org/software/emacs/manual/html_node/elisp/Integer-Basics.html), [Fortran](https://riptutorial.com/fortran/example/6321/literal-constants), [Go](https://go.dev/ref/spec#Integer_literals), [Haskell](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/binary_literals.html), [OCaml](https://v2.ocaml.org/manual/lex.html#sss:integer-literals) and [Rust](https://doc.rust-lang.org/rust-by-example/primitives/literals.html). It's hard to find a language without this feature (every single language that came to mind had it).


More information about the Digitalmars-d mailing list