What is Expressiveness in a Computer Language
Andreas Rossberg
rossberg at ps.uni-sb.de
Wed Jun 21 13:24:15 EDT 2006
Darren New wrote:
>
>> Maybe I don't understand what you mean with ADT here, but all
>> languages with a decent module system support ADTs in the sense it is
>> usually understood, see ML for a primary example.
>
> OK. Maybe some things like ML and Haskell and such that I'm not
> intimately familiar with do, now that you mention it, yes.
Well, Modula and CLU already had this, albeit in restricted form.
>> Classes in most OOPLs are essentially beefed-up ADTs as well.
>
> Err, no. There's nothing really abstract about them. And their values
> are mutable. So while one can think about them as an ADT, one actually
> has to write code to (for example) calculate or keep track of how many
> entries are on a stack, if you want that information.
Now you lost me completely. What has mutability to do with it? And the
stack?
AFAICT, ADT describes a type whose values can only be accessed by a
certain fixed set of operations. Classes qualify for that, as long as
they provide proper encapsulation.
>> Not counting C/C++, I don't know when I last worked with a typed
>> language that does *not* have this ability... (which is slightly
>> different from ADTs, btw)
>
> Java? C#? Icon? Perl? (Hmmm... Pascal does, IIRC.) I guess you just work
> with better languages than I do. :-)
OK, I admit that I exaggerated slightly. Although currently I'm indeed
able to mostly work with the more pleasant among languages. :-)
(Btw, Pascal did not have it either, AFAIK)
- Andreas
More information about the Python-list
mailing list