prototypes in Python [was: what is good in Prothon]

has has.temp2 at virgin.net
Sun May 2 14:21:47 EDT 2004


David MacQuigg <dmq at gain.com> wrote in message news:<sue79090tf0ja6rp63hsuj851l3dad0l44 at 4ax.com>...

> This is amazing! I don't understand how it works, but it does provide
> what I think the "classless" advocates are looking for, an ability to
> "clone" one object from another, and avoid any "two-tier" organization
> of instances and classes.

I posted an incomplete implementation of a simple proto-OO model built
on top of Python the other day. (As opposed to trying to mix it into
Python's existing class-based object system, which doesn't really gel
so well.) Here's the link:


> It is a shame that the discussion has degenerated to the point where
> most people are ignoring threads relating to prototypes. 

Well, it has little direct bearing on Python discussions so most folk
probably aren't interested anyway.

> I have tried
> repeatedly to get a simple requirements statement or use case, and get
> nothing but sarcastic remarks.  I have no experience with prototype
> languages either, 

That would probably be your problem then. I think you need to knuckle
down and do some self-motivated research before trying to wade in at
the deep end. I mean, if a forty-watter like me can manage to digest
it, a smart person like yourself shouldn't have any trouble [as long
as you go into it with a completely open mind].

> except a little with Prothon. 

Pick a language that's a bit more established and mature (and isn't
currently right in the middle of a great philosophical war;).

> I started to read a paper, but fell asleep after a discussion on the "theory of
> knowledge".

Well, you still got further than me. Reading/writing papers is
definitely _not_ one of my strong points; I'm much more the hands-on
"give it a go and see what happens" type. I'm not averse to lightly
skimming the odd bit of high-falutin' academic papery, however, and
even when I really don't understand what it's about at least I come
away with the vague notion that there are Other Ideas that exist out
there, rather than hiding in my own self-imposed box pretending that's
really all there is. Better to serve [fries] in heaven than rule in
[cobol] hell, I say.


> In spite of all this, there are some nuggets along the way.  The
> unification of methods and functions is the one I am most interested
> in.

This is not a proto-OO issue. 

BTW, if you want to see _really_ interesting things done with methods
and functions, go check out, say, Dylan. Multimethods are one of those
things that can sound really complex and intimidating at first
encounter - especially if you're only ever thought of OOP in terms of
how Java, Python, etc. do it - but are actually _incredibly_simple_,
not to mention rather beautiful. Go grok 'em; it'll really broaden
your mind.


> I agree with you that Python has the capability to implement
> prototypes.  Perhaps we can do that using metaclasses for some initial
> experiments.  Then if we get some constructive feedback, we can put
> together a PEP to make prototypes part of the core language, add
> better syntax, and fix whatever might not work quite right using
> metaclasses.

Wrong strategy. You cannot simplify an already complex thing by adding
even more stuff to it. I for one am already absolutely convinced that
proto-OO is ultimately the right way forward for the future of OOP on
dynamic languages, and that all the stuff we see and hear about Next
Big Things in [traditional] OOP, such as metaclasses and aspects, is
all just an almighty cloud of smoke generated by faddish, under-read
folk who have failed/refused to see/acknowledge that the problems they
are currently trying to solve now were/are A. already solved years
ago, but ignored then as now because they didn't fit neatly with the
then/current orthodoxy and would require significant backtracking to
adopt; and B. mostly generated by the various Really Bright Ideas To
Solve Our Problems they cooked up the last time round.

Of course, the longer that invested parties refuse to acknowledge the
fundamental flaws and mis-features in the foundation of their great
and grandiose sand castles in the sky and persist in pretending that
the solution is slopping even more flaws and mis-features on top, the
worse it's going to be for everybody when the whole lot _finally_
collapses under its own weight. So when that day comes, expect to see
me standing well to the side laughing my ass off.;)

has



More information about the Python-list mailing list