[prev in list] [next in list] [prev in thread] [next in thread] 

List:       e-lang
Subject:    Re: [e-lang] Wiki Software
From:       Lex Spoon <lex () cc ! gatech ! edu>
Date:       2006-11-30 11:21:33
Message-ID: 871wnl6uyq.fsf () astra ! dnsalias ! net
[Download RAW message or body]

Sandro Magi <smagi@higherlogics.com> writes:
> Well, objects are a simply poor man's closures
> (http://www.kimbly.com/blog/000063.html). ;-)

Yeah yeah, and all languages are really just Turing machines.  ;)


Intuitively, what I like about object-oriented programming is that
objects have common sense about themselves.  A list just *knows* how
long it is.  It is not just a dead, passive data structure.  If you
want to know how long a list is, in an OO language you ask it.  In a
functional language, you pull out your scalpel and slice the thing
apart.


Pragmatically, I like that you can substitute objects for objects so
long as they are the same on the *outside*.  You just have to
implement all the necessary methods.  In functional languages, each
such substitution requires careful planning.  It's not part of the
language, so you have to explicitly insert your override hooks.


Okay, yes, sometimes it is nice to wield the scalpel.  Fully exposed
ML-style data types are sometimes just the ticket, and--apologies for
the shameless choice of example--Scala's case classes seem like a good
way to give you access to those when you want it.  I don't like it
being the *only* approach to data structure as in functional
languages.

-Lex

_______________________________________________
e-lang mailing list
e-lang@mail.eros-os.org
http://www.eros-os.org/mailman/listinfo/e-lang
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic