Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.88k stars 530 forks source link

base-n literals? #13967

Open p5pRT opened 10 years ago

p5pRT commented 10 years ago

Migrated from rt.perl.org#122222 (status was 'open')

Searchable as RT122222$

p5pRT commented 10 years ago

From @jhi

(This is a much longer shot than the hexadecimal floats I reported earlier. Not necessarily the most urgent but for .. completeness?)

But while we are on the subject of more bases... quite many languages support literals and input/output bases 2-36 (36 = 10 + 26 ASCIIbets\, in lower or upper). No\, there are no obvious ways to continue the digits. Base64? Well\, which Base64?

Looking over at http​://rosettacode.org/wiki/Literals/Integer

BASErDIGITS

  BASE in decimal\, literal 'r'\, and then the digits\, e.g. 7r15 for 12

  Clojure\, Common Lisp\, Emacs Lisp (#BASErDIGITS)

BASEbDIGITS

  In J\, but J is really... different.

:BASE\

  Perl 6\, e.g. :3\<100110> (really...? that's... weird)

BASE#DIGITS

  PostScript

p5pRT commented 9 years ago

The RT System itself - Status changed from 'new' to 'open'