4 ms·
And Java since Java7 which was released in 2011.
by de6u99er 5y ago
And Java since Java7 which was released in 2011.
- nayuki 5y agoNote that different languages have slightly different syntax rules. 0_0: Legal in Java, legal in Python, illegal in JavaScript. 0__0: Legal in Java, illegal in Python, illegal in JavaScript. 0x_0: Illegal in Java, legal in Python, illegal in JavaScript. 0_, 0_.0, 0._0: Illegal in all three. It wouldn't surprise me if C# and C++(14) have differing edge cases too.
- chrismorgan 5y ago0_0, 0__0, 0x_0, 0_ and 0_.0 are legal in Rust. 0._0 is the only one of those that’s illegal (“`{integer}` is a primitive type and therefore doesn't have fields”).
- Zababa 5y agoTo clarify the special case in Rust ( 0._0 ), it's due to te definition of identifiers: https://doc.bccnsoft.com/docs/rust-1.36.0-docs-html/reference/identifiers.html https://doc.bccnsoft.com/docs/rust-1.36.0-docs-html/referenc.... _0 is an identifier, as it's an underscore followed by one alphanumeric character. Thus, 0._0 means "the field _0 of 0". Since it's an identifier starting with _, you won't get any warnings if you don't use it. Small example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b91364d3e27acda95c094f8cedbb71a4 https://play.rust-lang.org/?version=stable&mode=debug&editio...
- austinjp 5y agoO_o
- scns 5y agoInterestin, i saw it first in Kotlin.