[Haskell] Probably a trivial thing for people knowing Haskell

Friedrich frido at q-software-solutions.de
Sun Oct 19 11:24:15 EDT 2008


"Brandon S. Allbery KF8NH" <allbery at ece.cmu.edu> writes:

> On 2008 Oct 19, at 2:26, Friedrich wrote:
>> Paul Johnson <paul at cogito.org.uk> writes:
>>>> (By the way, putting in the top level type declarations helps a lot
>>> when you make a mistake.)
>> Well I have my problems with that. Probably it comes from using
>> Languages like Ruby and my special dislike of "typing things" comes
>> especially from Java, C++ (well C is not "innocent" in that regard
>> also.
>
> Learn to love types:  one of the neat things about Haskell is that if
> you can write down the type of a function then you have usually done
> 90% of the work of writing the code for it. 
Well I disagree. But that's another story.



> Another is that in
> general, if you can't express the type of a function, it means you
> haven't thought through what you're trying to do.

No  that's not true. The use implies that. However I'm not advice
resistant and will see if I use types. But IMHO that's should be job
of the environment  to figure out  correctly and most of the time
Haskell does "guess" right. And I surely can ask for the types. 



>  The relationship
> between types and proofs is especially obvious in Haskell.  And proofs
> aren't merely mathematical entities, they're expressions of what you
> want to accomplish:  if you can type your program, you have a high
> likelihood not only that it will compile, but that it will do what you
> intend.
Well I could argue with the types in C and would not come along very
far. In the TCP/IP stuff one can see what you have to do,  sooner or
later there is a cast... So I "betray" the type system... Or put more
friendly and make me a "programming" hero. Hey compiler I know you got
it but I'm right ;-)

Unfortunatly this "beeing right" often is wishful thinking...





-- 
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim 
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus


More information about the Haskell mailing list