Better HN
topnewbestaskshowjobs
Log inSign up

ethzero

4 karma · joined Nov 28, 2011 (15y ago) · 4 submissions

Submissions

comment 5y ago · link · parent

Here's one: https://www.reddit.com/r/stocks/comments/lamgp6/give_it_to_m...

comment 12y ago · link · parent

Spray allows you to define custom (even invalid) headers, all you have to do is subclass HttpHeader. I'm sure the author knew this, but it's not obvious from his criticism.

comment 13y ago · link · parent

You don't need tail calls in JavaScript in order have them in a language that compiles to JS. The tail call can be compiled as a while loop. This is what Scala does on the JVM (and presumably what Scala.js does as well).

comment 13y ago · link · parent

It's not an identical capability. Scala doesn't technically have operator overloading, it has symbolic method names and operator syntax for methods. This means you can use any valid name as an operator.

With C++, you can only overload the built-in symbolic operators. This means instead of choosing the best symbolic name to use as an operator you're forced to re-purpose some built-in operator like "<<". In Scala you can pick any name or symbol you want.