[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dylan's type system
- To: Jonathan Bachrach <Jonathan.Bachrach@ircam.fr>
- Subject: Re: Dylan's type system
- From: cfry@MIT.EDU (Christopher Fry)
- Date: Thu, 01 Oct 92 18:02:25 EST
- Cc: email@example.com
I'd like to second Jonathan Bachrach proposal for being able
to declare types all over the place.
This makes program understanding programs a lot easier to write, esp,
when you're trying to give the programmer a good error message.
But the real reason I like it is that it serves as documentation.
It will make the code easier to read because the programmer can
indicate their INTENT as they're writting. Even if the
programming environment treated them entirely as comments,
this would still help a coder catch more of their own bugs.
Putting such "comments" in a standardized place makes it easier
for another programmer to see the bugs too. I wouldn't want to
force anybody to specify types everywhere, but for many kinds of
big programs, my guess is that declaring types in variable defs,
fn args, and fn returned values would save hacker time.
This also leaves the door open for some smart programmer's assistant
to INFER types and fill them in automatically into the user's own
source code. When it came to an ambiguity or contradiction it could
ask the user what to do with a menu of options.