5 ms·
Arggh, every single time someone posts an incredible cool small piece of code that solves a difficult problem, comments like this appear. This whole HN attitud
by mathetic 11y ago
Arggh, every single time someone posts an incredible cool small piece of code that solves a difficult problem, comments like this appear.
This whole HN attitude of pristine code is killing me. This is a piece of code in a GIST and solves the problem in three lines, it is clearly not intended for production use in a large code base.
Please stop searching for something wrong and enjoy what is presented in all of its glory.
- zyngaro 11y agoMaybe it's the case here but in the scala community in general I noted a tendency to emphasize cleverness over clarity and simplicity.
- ADRIANFR 11y agoRelevant Stack Overflow question: http://stackoverflow.com/questions/7084212/is-scala-idiomatic-coding-style-just-a-cool-trap-for-writing-inefficient-code http://stackoverflow.com/questions/7084212/is-scala-idiomati...
- deleted 11y ago[deleted]
- haddr 11y agoThe difference here is that when you read the title you think: "wow, scala features allows solving interesting problems in few steps, let's see". And the you realize that it's a cheat. This code is literaly squeezed into those 4 lines, full of less common idioms, and quite obscure. It should be called "0,5kb scala contest" than "solving x with scala", to avoid misunderstanding.
- pyrale 11y agoThis piece of code doesn't "solve" the problem, it's a crude bruteforce implementation. The problem is hard for a reason. Another way this code could be useful would be to showcase good readability practices, but it doesn't.