Very insightful. I forgot code ran.
Very insightful. I forgot code ran.
Example the first and one of the biggest: SQL. Sure, it's a declarative language... after you learn how databases work, after you learn how indexes work, after you profile your biggest hitting queries and work out how to rewrite them into semantically equivalent queries that perform orders of magnitude faster, after you learn how to deal with sharding, after you learn when to denormalize and when not to, after you learn the necessary performance hacks that trick the indexer into doing what you need instead of what it thinks is correct, and after a few more things I could go on about, it's a declarative language where you don't have to worry about performance any more. Yup, totally declarative.
I like Haskell, but only because I can mostly (although not entirely) see through it.
"The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong, it usually turns out to be impossible to get at and repair." - Douglas Adams
Anything that claims to be declarative is lying. All declarations in some given environment entail some process that will be used to obtain your results, you will not be able to get good performance if you don't know that process, and actively obscuring those processes only makes it harder.
You can't afford to ignore the side effects of "pure" functions.
- http://haskell.org/haskellwiki/The_Fibonacci_sequence
- http://vimeo.com/20655874 ("Faster persistent data structures through hashing")