[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: the forward method [dynamic vs. static typing]



Ken Shan wrote:

> Static typing can make programs more concise: I can write
> 
>     getLine >>= print . (/2) . read
> 
> or
> 
>     getLine >>= print . not . read
> 
> rather than
> 
>     getLine >>= print . (/2) . readDouble
> 
> or
> 
>     getLine >>= print . not . readBool

Nice and convincing example. It seems to me that you can only get this 
effect in a DT language by implementing your own type inferencer.

Thanks,
Pascal

-- 
Pascal Costanza               University of Bonn
mailto:costanza@web.de        Institute of Computer Science III
http://www.pascalcostanza.de  Römerstr. 164, D-53117 Bonn (Germany)