News for hackers. Stuff that matters.
Re:Do We Worship Complexity? by Apaec on Thursday October 18, 2018 @04:04PM (#18251652)
Wanted to state the main idea first. I definitely agree about one-liners, Perl and APL come to mind.

There are some other aspects to this idea of code economy: correctness and reusability. This definitely depends on the programming language.

In Java(or oop for that matter) you can get correctness but to get reusability you need a whole hierarchy of classes, lots of added code/cost.

In Python you get more reusability out of the box but to get correctness you need to add swaths of unit tests, lots of cost.

In contrast with a functional language such as Haskell you get both with less effort, fp plus a rich type system reduce code enourmosly.

Re:Do We Worship Complexity? by aldanor on Thursday October 25, 2018 @11:16AM (#18301527)
Same with Rust, to some extent -- in some cases it's extremely hard to get a program to compile, fighting with borrow checker along the way, but when it's done and done you can be fairly sure it won't segfault due to a dangling pointer or something stupid of the sort. It also makes it easier for you to trust the code written by others, e.g. when working on a large codebase collaboratively.
Re:Do We Worship Complexity? by Apaec on Friday October 26, 2018 @11:33AM (#18310190)
Rust is another favorite of mine, and with Rust you also get efficiency besides correctness and reusability.

I wish Rust would have gone with an ML syntax though, in particular the Hindley-Milner type signatures allow me to reason better about code reusability, the "fn" and braces just adds noise to me, too much Haskell I guess.