3 ms·
My two takeaways from this article are that beauty is in the eye of the beholder, and that C++ is a horrible mess. Many of these examples I found less than beau
by shmageggy 11y ago
My two takeaways from this article are that beauty is in the eye of the beholder, and that C++ is a horrible mess. Many of these examples I found less than beautiful, but hey, to each his own. And I feel bad for the author and anyone else who has to work in C++, since it forces you to choose between genericity and readibility. Either your code is rigid, or it's a bloated, unreadable mess.
Here's some "eyebleach" for anyone else who might be a little sad after reading this; I've been learning Haskell and recently came across a definition of a Fibonacci function that I found eminently beautiful.
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
- CyberDildonics 11y agoIgnoring for a moment that Haskell doesn't accomplish the same goals as C++, getting caught up in expressions is something I've found to be indicative of amateur programming. The overall architecture of a piece of software is hugely more important to productivity, speed, and correctness.
- kungtotte 11y agoAmen. You know how often I have to write a Fibonacci function for real? Let alone care about its elegance...