Newer languages have been abandoning the prefix 0, as decimal numbers are often represented with leading zeroes. The prefix q was introduced to avoid the prefix o being mistaken for a zero, while the prefix 0o was introduced to avoid starting a numerical literal with an alphabetic character (like o or q), since these might cause the literal to be confused with a variable name. The prefix 0o also follows the model set by the prefix 0x used for hexadecimal literals in the C language; it is supported by Haskell, OCaml,OCaml: 7.1 Lexical conventions Python as of version 3.0,Python 3: https://docs.python.org/3.1/reference/lexical_analysis.html#integer-literals Raku,Perl 6: http://perlcabal.org/syn/S02.html#Radix_markers Ruby,RubySpec: https://github.com/ruby/ruby/blob/master/spec/ruby/core/string/to_i_spec.rb Tcl as of version 9,Tcl: http://wiki.tcl.tk/498 PHP as of version 8.1,PHP.Watch - PHP 8.1: Explicit Octal numeral notation https://php.watch/versions/8.1/explicit-octal-notation RustRust literals and operators: https://doc.rust-lang.org/rust-by-example/primitives/literals.html and ECMAScript as of ECMAScript 6ECMAScript 6th Edition draft: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-numeric-literals (the prefix 0 originally stood for base 8 in JavaScript but could cause confusion, therefore it has been discouraged in ECMAScript 3 and dropped in ECMAScript 5).
Newer languages have been abandoning the prefix 0 as decimal numbers are often represented with leading zeroes The prefix q was introduced to avoid the prefix o being mistaken for a zero while the prefix 0o was introduced to avoid starting a numerical literal with an alphabetic character (like o or q) since these might cause the literal to be confused with a variable name The prefix 0o also follows the model set by the prefix 0x used for hexadecimal literals in the C language; it is supported by Haskell OCamlOCaml 71 Lexical conventions Python as of version 30Python 3 https//docspythonorg/31/reference/lexical_analysishtml#integer-literals RakuPerl 6 http//perlcabalorg/syn/S02html#Radix_markers RubyRubySpec https//githubcom/ruby/ruby/blob/master/spec/ruby/core/string/to_i_specrb Tcl as of version 9Tcl http//wikitcltk/498 PHP as of version 81PHPWatch - PHP 81 Explicit Octal numeral notation https//phpwatch/versions/81/explicit-octal-notation RustRust literals and operators https//docrust-langorg/rust-by-example/primitives/literalshtml and ECMAScript as of ECMAScript 6ECMAScript 6th Edition draft https//peoplemozillaorg/~jorendorff/es6-drafthtml#sec-literals-numeric-literals (the prefix 0 originally stood for base 8 in JavaScript but could cause confusion therefore it has been discouraged in ECMAScript 3 and dropped in ECMAScript 5)