|
Home
>
1. intro
>
1.3 how to help newcomers to get the right "mental models?
>
1.3.4 What is a OODL ( OO Dynamic Language)?
|
Previous
Next
|
|
|
|
|
|
Mark C.
Carroll"
|
A dynamic language is a language in which programs are dynamic
entities. In other words, programs can create and change programs.
In C++, the program is basically cast in stone at compile- time. The
program cannot create new variables or functions while it's running;
variables and functions can only be created in the source code
when the program is initially being compiled.
In Dylan, because it's dynamic, the program can create new
variables, classes, and methods _while it's running_. You can do
things like write a database where the object stored in the database
are dylan objects; and create new classes for each type of object
that your user creates. In a static language like C++ or Eiffel, you'd
have to write a class which implements user defined classes, and
rewrite the entire method selection process - but in Dylan, you
could just add classes, and used the system built in to the
language.
|
|
Graham
Matthews
|
Forgive me if I am being stupid but could you not do the same in a
functional language? As far as I can see you can so I am not quite
sure why the "OO" part of "OODL" is relevant.
|
|
Mike Haynie
|
Actually, you would need a *dynamic* functional language. At the
moment, it is assumed that functional languages are dynamic, but
that *could* be compiled away by a (not very) clever compiler. Then
you would have lost the ability to "create and change programs,"
while retaining the properties of a functional program.
- We want the OO part because
of the perceived benefits of OO design/programming.
- We want the "D" part to support
things like extending (fixing) running programs, and applications
that extend themselves.
Finally, it's a language. ==>"OODL"
|
|
Mark C.
Carroll"
|
The object-oriented nature of Dylan and the dynamic nature of dylan
are largely orthogonal. The combination of the two is particularly
powerful, because of the ability to dynamically create classes. But
you are absolutely correct that the fact that Dylan is OO has little to
do with the fact that Dylan is dynamic.
|
|
Daraius
Edibam
|
It's also more Object-Oriented than C++, because C++ doesn't have
real objects ! They exists only in the design- and compilation-
phase : after you compiled you object-module, the object is actually
'replaced' with assembler-code (but with the method- definitions still
intact). In C++ f.i., you can't just send a 'print' message to an
unknown object whose pointer you just found somewhere : you have
to known the type in advance ! This situation isn't very flexible for
the programmer, which is why (some) people use Objective C, Lisp
or Dylan...
|
|
David A.
Moon
|
Mr. Carroll's essay was interesting, and certainly one reasonable
expansion of the abbreviation "OODL". However, it should be
clarified that this is not what Apple means when they say "OODL".
Apple's definition can be found
|
|
|
|
|
|