CppCon 2016 Presentation Materials
github.com2 pointsby dzderic0 comments
The possibility of representing face cards with a name would likely never occur to you, because it would be too complicated to go through the effort of defining the type of a rank to be a "integer or a class comprised of four case classes -- jack,queen,king,ace".
I'm sure every competent Scala developer will see that the equivalent in Clojure can be done with val King = 13; val Queen = 12; ..., which also means you get ordering for free as you're not mixing ints and keywords. $ time python -c 'print sum(xrange(100000000 + 1))'
5000000050000000
real 0m1.398s
user 0m1.383s
sys 0m0.012s
Comparison to baseline: $ time (echo -e 'n=0 \ni=0 \nwhile (i <= 100000000): \n n += i \n i += 1 \n\nprint(n)\n' | python)
5000000050000000
real 0m33.140s
user 0m32.939s
sys 0m0.023s