HNHacker News
TopNewBestAskShowJobs

9t3h4r3o5w1a4w2

23 karma · joined August 25, 2017

submissionscomments
9t3h4r3o5w1a4w2··on Go 1.9 is released
The problem is that Go errors are just a convention, they are not a feature of Go. It's just an interface, it could have been called FOO it wouldn't have made a difference. Go has exceptions, they are called "panic" by they are inferior to Java in the way they are handled.
9t3h4r3o5w1a4w2··on Go 1.9 is released
> it infuriates me when third-party stuff in other languages throws exceptions and you end up needing to check everything anyway. exceptions are a curse.

Anything can panic in Go. Go gives absolutely no guarantee something cannot panic. Errors as values are just a convention. So exceptions are a curse but Go has an inferior exception system, panics, but they are still exceptions.

The solution is checked exceptions.

9t3h4r3o5w1a4w2··on Leaving Python for JavaScript
> if you have a multiline function it should be named and unit-tested instead of just stuffed anonymously into some pyramid of doom

It's like saying all data should be declared as variable, in the functional programming paradigm, functions are data. That's why closures are useful. And it has absolutely nothing to do with unit-testing, that's beside the point. Javascript is not harder to unit test because it has fully featured anonymous functions.

9t3h4r3o5w1a4w2··on Leaving Python for JavaScript
Python has lambda but they are one liners.

There is no way to do write this in Python:

   someFunc( _ => {
       // this is 
       // a function 
       // with multiple lines
   })
Having to define a named function to use it as a callback is a pain in the ass.

Python has an excellent standard library but the language itself is pretty mediocre IMHO. Classes are an afterthought thus verboses, as so is "functional programming" in Python.

JS biggest issue is that it is not strongly typed enough. But ES2015 makes it really pleasant to use.

9t3h4r3o5w1a4w2··on The U.S. is risking an academic brain drain
Canada doesn't pay half as well as US when it comes to research in STEM. Every country has great talent right now, except US has the money.
9t3h4r3o5w1a4w2··on The U.S. is risking an academic brain drain
To where? US is basically where most of the capital is when it comes to research in the western world.
9t3h4r3o5w1a4w2··on Decommissioned mobile devices as cheap energy-efficient compute nodes
I have at least 4 Android phones that have either a broken screen (but still usable) or are just too old to run a recent version of Android. Anybody knows how can I use them as computers or even servers? how to connect them to the network without using wifi? they obviously don't come with a network port.