[Haskell-cafe] I love type declarations. :-)

Radu Grigore radugrigore at gmail.com
Fri May 6 04:36:12 EDT 2005


On 5/6/05, Daniel Carrera <dcarrera at digitaldistribution.com> wrote:

> function ::  Int -> Int -> [Int]
> Before, when writing imperative code, I would add a comment for each
> function describing its input and output. Now type declarations provide

What do you mean? In C++ one would write:

vector<int> function(int a, int b) { ... }

Type annotations are independent of functional/imperative style.
(Although C++, the most used imperative language requires type
annotations).

-- 
regards,
 radu
http://rgrig.blogspot.com/


More information about the Haskell-Cafe mailing list