[Haskell-cafe] Haskell for non-mathematicians (was: Specify array or list size?)

Sebastian Sylvan sebastian.sylvan at gmail.com
Tue May 10 15:25:19 EDT 2005


On 5/10/05, Bulat Ziganshin <bulatz at hotpop.com> wrote:
> Hello Sebastian,
> 
> Tuesday, May 10, 2005, 8:39:23 PM, you wrote:
> 
> SS>  I think that runtime error
> >> messages given in terms of VALUES instead of compile-time error
> >> messages given in terms of TYPES are easier to understand for novice.
> >> also, strict regulations on datatypes are needed for professional
> >> program development, but will be just needless complication for
> >> learning concept of programming itself. even for mathematician Ruby
> >> will be a good choice
> >>
> 
> SS> I disagree.
> SS> Types is a very important concept and I think that should be
> SS> emphasized in the first lecture. If one goes through types _and_
> SS> values from the very beginning a strongly typed language will be of
> SS> the same aid to beginners as it is to experts.
> 
> imvho, exposing types to non-professionals is like exposing light
> theory to a kid which just want to draw a picture. values are just
> enough to these peoples

Why?
A value has a type, that's very natural and also important. It's more
like teaching someone who wants to paint what types of paint exist and
how they work together.

I strongly oppose the idea that one should hide fundamental concepts
to newbies, I think that will lead to extreme difficulties later on.
Even in untyped languages you need a concept of types. You WILL need
to say something like "'apple + 5' won't work because they have
different _types_ of values", so why not use a language which enforces
this concept in practice? I think it's better to enforce things like
this to the newbie, once they have a good understanding of types
_then_ they might be able to use an untyped language responsibly, but
until they do I think it's fine for the compiler to instruct them when
they make a misstake instead of simply getting some weird runtime
error.

You don't need to expose some of the more advanced type-system hacks,
but simply ignoring something so fundamental such as types is in my
opinion not very helpful.

I really see no validity in the standpoint that untyped languages are
better to teach to the newbie.

/S

-- 
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862


More information about the Haskell-Cafe mailing list