Hacker News new | ask | show | jobs
by mihai_ionic 4380 days ago
Meanwhile, in C++14:

    auto min = [] (auto a, auto b) { return a < b ? a : b; };
1 comments

Meanwhile, in Haskell:

    min x y = Data.Bool.bool x y (x > y)
Although considering what the article was talking about, doing stuff like this only makes you sound like an ass.
I have come to really dislike people who think it's a good idea to define macros such as min, max, major and minor in system headers.

* http://msdn.microsoft.com/en-us/library/windows/desktop/dd75...

* http://msdn.microsoft.com/en-us/library/windows/desktop/dd75...

* https://stackoverflow.com/questions/22240973/major-and-minor...