Darren New wrote:
Andrew Lentvorski wrote:
Darren New wrote:
Wade Curry wrote:
Verbosity tends to follow along with OO languages, though.
I would disagree. The verbosity comes from trying to look like
traditional languages. There's really only 2 or 3 operations in a
purely OO language: assignment, message dispatch, primitive
invocation, stuff like that.
Careful. There is not universal agreement on that. CLOS most
certain does not qualify as having *message* dispatch.
Yeah yeah. Dynamic polymorphic dispatch. Better? :-)
I think the term for CLOS is "generic dispatch", but I like your
expression. I'm not entirely sure it need be dynamic, but I haven't seen
a language with purely static polymorphic dispatch and I'm having a hard
time imagining one.
Indeed, I'd say languages like C++ don't even have message dispatch.
They have method dispatch, but no messages. (I.e., you can't package
up a method dispatch as a data item. There's no class whose instances
represent calls on methods.)
You can create such an object with boost::bind.
I'm not really sure how much message dispatch should be associated with
OO. Yes, Smalltalk does it, but Smalltalk does a lot of things, and not
all them are associated with OO.
Other languages don't agree that assignment is part of OO.
Really? I can't even imagine a pure OO language that doesn't support
assignment. What language would this be?
Some kind of language built around linear variables, I'd imagine.
In any case, the point stands that the verbosity doesn't come from the
OOness. Witness Smalltalk.
Verbosity tends to be more a function of static typing. One of the main
ideas with static typing is to allow your compiler to check some of the
correctness of your code, and for that to work there effectively has to
be redundant information in your code (a type failure occurs when you
specify the type of something and it doesn't match what the compiler was
able to determine is needed).
While programmers tend to hate verbosity (myself included), there is a
*lot* to be said for its benefits in making code easy to
read/understand, easy to discern what was intended in the case of an
error and therefore easy to debug.
Of course, I find brevity also helps me to read/understand programs, so
there you go. ;-)
--Chris
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg