Theiling Online    Sitemap    Conlang Mailing List HQ   

Re: OOPs!! When is a class not a class? (Re: Number/Specificality/Archetypes in Language)

From:Ray Brown <ray.brown@...>
Date:Friday, September 24, 2004, 17:34
On Thursday, September 23, 2004, at 09:57 , Keith Gaughan wrote:

> Ray Brown wrote: >> set of objects sharing similar properties & methods. But - {blushes >> deeply} >> - if I had stopped to think about it, Javascript could not have formal >> classes because it is such a weakly typed language. (Darned scripting >> languages :) >> >> OK - Philippe, if your only experience of using objects is JavaScript, >> maybe we had better not continue using the class ~ object analogy >> otherwise we are very likely to be talking at cross-purposes, which won' >> t >> help anybody. > > Oh, for the time!
Amen!! I'm busier now I'm retired than I have been for many a year.
> JavaScript uses prototype-based OO, unlike the > class-based OO of most languages. The thing about POP is that it's > far more powerful and flexible than classed-based OO.
My "darned scripting languages" was not meant to be serious. I certainly wasn't intending to imply that strict typing & formal classes were better (or worse) per_se than any other type of approach. My main purpose was simply to point out that I had not done my homework, so to speak, and when I woke up to the fact that 'class' in Java & C++ has a different meaning from the informal use of class that Philippe has probably come across with Javascript, I thought it best to point out that we are probably talking at cross purposes here. I can well believe POP is more flexible and powerful. I still remember how, many years ago, I was really excited when I discovered Prolog - and that language is about as untyped as it's possible to get. One of the things I really liked about Prolog was its flexibility & power. Indeed, of all the languages I've used, Prolog still remains the one I most enjoyed using.
> I don't have a lot of time to go into it. But I'll say that it's a > really bad idea to try and program JavaScript like a class-based > language.
That I will not dispute for one moment. IME it is always a bad idea to try and program a language designed one basis in terms another with a different basis, sort of like programming (logic-based) Prolog as tho it was (procedural) Pascal - which I have seen, ach!!! It usually does mean.. ...
> While you can, you end up missing out on a lot of the power > it has hidden within.
Exactly.
> Off the top of my head, I'd so say read the > following:
URLs snipped - but thanks, I'll try to make time to read some :) Ray =============================================== http://home.freeuk.com/ray.brown ray.brown@freeuk.com =============================================== "They are evidently confusing science with technology." UMBERTO ECO September, 2004

Reply

Keith Gaughan <kmgaughan@...>