News for hackers. Stuff that matters.
Re:Go makes it easier to write correct, clear and efficient ... by blablabla123 on Friday May 10, 2019 @12:28PM (#19879347)
Yeah but I think for non-trivial programs, say 10k+ lines of code, it's really difficult to show proper examples, not to speak of exhaustive coverage. Go in particular doesn't have many fancy language constructs and a lot of well written code in Go 1 might look a bit repetitive, especially the error handling. But once you wrote a larger program and followed best practices with error handling, you might be delighted how much more compact error messages are and still offer a lot of greppable things to debug after.

Probably there are languages that have a really expressive syntax that solve problems also in a scalable manner. For instance Python with its list comprehension that are a real code and time saver for software that does a lot with lists. (No coincidence it's so popular with ML.)

Re:Go makes it easier to write correct, clear and efficient ... by mratsim on Saturday May 11, 2019 @01:51PM (#19887399)
In ML you really want to use Numpy ndarrays, Pandas dataframes or Tensors.

A list is much too slow because:

- Not contiguous - No SIMD vectorization - No parallel processing

Lists are mostly used for list of containers (for example storing the arrays inputs of a function)