| Store | Cart

OT(Slightly): Thanks to Python.

From: Jacek Generowicz <jace...@cern.ch>
05 Mar 2004 10:43:35 +0100
"John Roth" <newsgroups at jhrothjr.com> writes:

> "Ville Vainio" <ville at spammers.com> wrote in message> news:du73c8ofx57.fsf at mozart.cc.tut.fi...> > >>>>> "David" == David M Cook <davecook at nowhere.net> writes:> >> >     David> I would call it *pragmatically* implemented OOP.  It's not> >     David> "proper" as some would see it.> >> > Elaborate?> > As I understand it, there are a number of issues.> > 1. Lack of method polymorphism

[...]

> 1 would be nice at times, but there's no way it's> going to happen in a language that doesn't have> static typing.

Sigh ...

* (defmethod foo ((x integer))
    (format t "~&~s is an integer" x))
#<Standard-Method FOO (INTEGER) {480054CD}>


* (defmethod foo ((x string))
    (format t "~&~s is a string" x))
#<Standard-Method FOO (STRING) {4800ABED}>


* (foo 2)
2 is an integer


* (foo "hello")
"hello" is a string


The ANSI standard for the _dynamically typed_ language shown above,
which implements the behaviour you claim will "never happen in a
language that doesn't have static typing", is about a decade old. (The
capability itself is at least another decade older.)

Recent Messages in this Thread
Adonis Mar 04, 2004 02:11 am
Ben Finney Mar 04, 2004 03:33 am
Aahz Mar 04, 2004 04:25 am
David M. Cook Mar 04, 2004 02:57 pm
Ville Vainio Mar 04, 2004 03:29 pm
John Roth Mar 04, 2004 04:37 pm
Michael Hudson Mar 04, 2004 07:40 pm
Christopher Koppler Mar 05, 2004 09:03 am
Jacek Generowicz Mar 05, 2004 09:43 am
JanC Mar 05, 2004 05:16 pm
Jacek Generowicz Mar 08, 2004 09:24 am
JanC Mar 09, 2004 09:25 pm
Michael Hudson Mar 10, 2004 11:47 am
Jacek Generowicz Mar 10, 2004 03:03 pm
David M. Cook Mar 05, 2004 06:32 am
David M. Wilson Mar 10, 2004 08:34 pm
Bob Ippolito Mar 04, 2004 11:51 pm
Capt...@altel.net Mar 04, 2004 03:34 am
Aahz Mar 10, 2004 10:48 pm
Messages in this thread