92 karma · joined March 18, 2008
Arithmetic algorithms still have value - for the insight they give on arithmetic and because following a complex algorithm is itself a skill with value.
But there is no need, as we do now, to insist on performing them so many times, or to do them very quickly in exams.
The main problem with this new approach, I feel, is that it makes learning mathematics harder. Building richer conceptual models which is necessary for both applications or theory is more interesting and meaningful, but also more difficult than following prescribed algorithms. It is harder to test in an exam, and where testable the problems are much harder.
This issue of algorithms vs conceptual understanding, is important at the undergrad level too. Eric Mazur has a nice video about this where he also talks about his way of testing conceptual understanding by asking very simple but illuminating questions - http://www.youtube.com/watch?v=WwslBPj8GgI
Some basic things which i didn't knew in the begining :
Fast persistent data structures - Coming from imperative langs, one might be hesitant to write functions which take a million elt vector, modify it and return a new vector. It is important to know that any good implementation of functional data structures will allow you to do this in constant time & speed. (independent of the size of the data structure).
Editor combinators : If you arent aware of this & are modifying a data structure with several levels of nesting, imperative assignment will seem much more convenient, ie dont translate foo.bar[8]=3, into something of this pattern barNew = editVector(foo.bar, 8, 3), fooNew=editMap(foo, "bar", barNew). It gets worse with more levels. Instead, use an editor-combinator library which will allow to you specify the path within the data-structure and a new value just as in the imperative case.
Things to know which are not strictly FP related, but nevertheless very useful - pattern matching simplifies definitions a lot, typeclasses are usually more convenient than class hierarchies.
Someone has already pointed out advice on libraries, (Clojure or any using any popular language in a functional way).
The main thing which motivates all of this - composability. It is hard to combine procedures with side effects into compound procedures because one needs to keep track of whether the component procedures are interfering with each other. FP eliminates this friction in composition.
This surrounding context inference feature, which is useful for type classes other than monads, has the unusual consequence that you need to specify more typeinfo in a dynamic language.
It is a somewhat unusual tax, in that your tax rate is based on what proportion of your assets are in dollars. Does someone know what the rate per year on dollar assets is and how to calculate it? You would need to know how much money the Fed prints in a year. Do they publish it or was that what auditing the fed was about?
Also for A), banks probably factor in inflation while setting the interest rate for a loan. So, the relevant variable, i guess, is unexpected inflation rather than the value of inflation itself. The debtor benefits only when the loan market makes low estimates.
Also, there is a similar programming qn. Suppose you have a program P running on a machine Q, and the api for a machine C is implemented on Q, so that programs for C can be run on Q. How do we actually figure out if P is really a C program running on Q?
ML which uses ADTs solves this problem nicely. You can just write a module containing the map which implements two different signatures, one signature with the restricted set of fns, and another signature which will expose the map. Regular modules will import the restricted signature, while serialization or database interaction modules can import the map signature.
I like PLT scheme's unit system which comes from ML. It is better in two ways, units & signatures are first class values. And, you can use the powerful macro system to get rid of any repeated syntax pattern involved in exposing a map in two different ways.
In many cases theories become simpler not more complicated with constructive foundations for mathematics, (for instance, synthetic differential geometry is a much more elegant way of doing geometry). Modern categorical foundations for mathematics, using topos theory, has intuitionistic logic as its natural language.
It is exactly constructive foundations of mathematics which is related to foundations of programming languages, and this in many cases is formalized via the Curry-Howard correspondence which takes programs to proofs and vice versa.
The interesting question is how is this 'minimizing of identity' to be done? One idea i've heard is the following, Usually this psychological response happens in the background, the unconscious so to speak, Instead one can be try to be aware of it, not just abstractly but live. Watching a reflexive response and its influence on action at the same time as it happens.
More importantly, it is possible that most people are wrong on some particular question about a market. If so, a sudden discovery of the truth by the mainstream might lead to a desertion of this market.