News for hackers. Stuff that matters.
Re:V8 release v7.2 by walki on Tuesday December 18, 2018 @09:19AM (#18706513)
> #aargh

Many system programmers will think this line is commented out. Indeed what a nightmare!

Re:V8 release v7.2 by jlokier on Tuesday December 18, 2018 @09:30AM (#18706568)
Yup.

The muscle memory is so strong, when writing Javascript/Typescript I type # by accident sometimes.

But then, // is one of the most commonly used operators in another language I use, so it's weirdly symmetrical :)

Re:V8 release v7.2 by henrikeh on Tuesday December 18, 2018 @10:21AM (#18707050)
Curious: which language?
Re:V8 release v7.2 by jlokier on Friday December 21, 2018 @12:11PM (#18734673)
Perl, the defined-or operator.

Like ||, but // tests definedness instead of truthiness.

The equivalent in several other languages is ??, which is uglier imho, but it's just syntax. https://en.wikipedia.org/wiki/Null_coalescing_operator

I use // and ?? often as it's conceptually clean, fast and concise. When available, it arises naturally in logic like caches, memoizations and defaults. //= is pretty useful too, and I'm surprised it's not more widely available.

Re:V8 release v7.2 by madamelic on Tuesday December 18, 2018 @10:30AM (#18707133)
Python uses it for integer division. Typically it is meant as "divide and floor" as far as I've seen.
Re:V8 release v7.2 by Memosyne on Tuesday December 18, 2018 @10:32AM (#18707160)
Wouldn't most system programmers think it's a macro?