3 ms·
"Suppose you need a C++ program to calculate the distance between two points."
- ordu 3y agoMaybe it is me, but it seems more like a parody showing how not to do things. I believe the easiest way to do it is something like: mypoint.coords().map(|x| x * x).sum().sqrt() Instead there are dozens of lines of code adding some obscure constructs with the only goal to hide what happens and without any idea why we need to hide. You can find words "this design rationale", hinting that somehow this text may explain motivation behind all the complexity, which is also sounds to me as a sarcasm. > Copyright © 2009-2013 Barend Gehrels, Is 2013 the year when C++ people came to their senses and stopped doing that?
- sema4hacker 3y agoCall me a simpleton, but I'd rather have a simple library routine for the case I'm handling, even if the library needs lots of routines for all the variations I might run into, instead of one Swiss-army-knife routine that tries to do everything (that will take me so long to understand that I end up just writing the routine I need instead of trying to grok the library).
- ttfkam 3y ago"Suppose you need a C++ program…" No.