names, modules, types

Marcin 'Qrczak' Kowalczyk qrczak@knm.org.pl
8 Feb 2001 20:20:56 GMT


Thu, 8 Feb 2001 12:46:29 +0100 (MET), Johannes Waldmann <joe@isun.informatik.uni-leipzig.de> pisze:

> Yes, I see that. However I think that adding type signatures is
> good programming practice anyway, and I wouldn't mind if a future
> Haskell required me to do some explicit typing (for top-level
> definitions, say).

Types of top-level definitions are not enough when every identifier
can have many completely unrelated types, and types of subexpressions
are derived both from their contents and context.

> What are the ergonomic benefits of allowing the programmer
> to omit type declarations? It does invite sloppy programming, no?
> And does it make life easier or harder for the compiler (writer)?

Adding overloading like in C++ certainly it makes life harder for the
compiler writer. IMHO it does not work at all in a language with HM
type system when the type inference does not proceed inside-out only.

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK