 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
clipka wrote:
> My copy of Wikipedia categorizes Tcl as "multi-paradigm".
...you downloaded the Internets?!
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New schrieb:
> clipka wrote:
>> - even though it does appear to be mainstream indeed, it doesn't seem
>> to fit the bill of "Non-OO ... (imperative) language".
>
> It's not OO. There's a library to make it look like it's OO. When you
> use that library, each object is represented as a global procedure. It
> can kind of sort of look OO, but it isn't.
Given that I have the impression that you accept as OO only what has a
certain runtime structure, instead of what aids in implementing an OO
design, I prefer to trust Wikipedia on this matter.
If it /feels/ like OO (i.e. it supports your attempts at implementing an
OO design), it /is/ OO.
>> As for Ada: When I think "mainstream", I don't usually think avionics,
>> weapon systems or spacecraft - or any other embedded or real-time
>> application, for that matter.
>
> OK. When I say "mainstream", I mean a language that's actually used for
> actual development by people other than those at the same company where
> the language was invented. I rule out things like Blue and Sing# and
> such, the experimental languages crafted for a specific program to be
> written in.
That would (for most part) match "production" language in my set of
definitions.
To be mainstream, something really needs to be... well, you know, in the
/main/ stream.
You wouldn't call some clothes fashion to be mainstream just because
people sell the clothes instead of sewing them at home for their own
personal use, would you? Or call some musical style mainstream just
because you can buy that type of music on audio CDs?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 schrieb:
>> My copy of Wikipedia categorizes Tcl as "multi-paradigm".
>
> ...you downloaded the Internets?!
Part of it, yes - typically every time I call up a page :-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
clipka wrote:
> you accept as OO only what has a certain runtime structure
No, I call something OO if it has more "OO" to it than (say) stdio.h. :-) It
needs objects, and data associated with objects, and stuff like that.
> If it /feels/ like OO (i.e. it supports your attempts at implementing an
> OO design), it /is/ OO.
Tcl's an extensible language. People have written libraries that emulate
some aspects of OO. Tcl is no more OO than C is OO because someone invented
cfront. Just like the existence of Candygram doesn't make Python an
actor-based language.
Tcl's OO works by creating a procedure for each object. Invoking that
procedure causes it to use the first argument as a string to look up the
method to run, and the name of the procedure itself as an index into a
global hashtable to find the data associated with the object. I guess if you
squint hard, you could say it supports OO. It's not what I'd call an OO
language, tho. It's a procedural imperative language with an optional and
not widely used lump of library that rewrites procedural code to look sorta
OO if you don't peer too close.
> That would (for most part) match "production" language in my set of
> definitions.
Fair enough. That, then. :) I was trying to distinguish "one-off
experimental languages designed specifically to aboid what I was talkign
about" from "real" languages. (Altho, honestly, at this point I've
forgotten what I'm talking about.)
> To be mainstream, something really needs to be... well, you know, in the
> /main/ stream.
> You wouldn't call some clothes fashion to be mainstream just because
> people sell the clothes instead of sewing them at home for their own
> personal use, would you? Or call some musical style mainstream just
> because you can buy that type of music on audio CDs?
No, but I'd call police uniforms "mainstream" even tho only policemen use
them. :-)
--
Darren New, San Diego CA, USA (PST)
I ordered stamps from Zazzle that read "Place Stamp Here".
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> clipka wrote:
> > you accept as OO only what has a certain runtime structure
> No, I call something OO if it has more "OO" to it than (say) stdio.h. :-) It
> needs objects, and data associated with objects, and stuff like that.
> > If it /feels/ like OO (i.e. it supports your attempts at implementing an
> > OO design), it /is/ OO.
> Tcl's an extensible language. People have written libraries that emulate
> some aspects of OO. Tcl is no more OO than C is OO because someone invented
> cfront. Just like the existence of Candygram doesn't make Python an
> actor-based language.
I think one should distinguish between Object-Oriented Design (OOD) and
Object-Oriented Programming (OOP). While the distinction might often be
rather fuzzy, and often they are very tied together (because, after all,
implementing an OOD is often best done with an OOP language), they can
still be used independently.
For example, many programs have a full-fledged OOD but are then
implemented in a language which supports little to no OOP, most
typically C (and even when OOP is more or less "emulated" with C, only
very few actual OOP techniques are used).
(The other extreme might also be possible in some cases, ie. "abusing"
an OOP language for a design which has very little object-orientedness
in it. Could eg. be more akin to objects being "abused" for functional
design and programming techniques.)
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> For example, many programs have a full-fledged OOD but are then
> implemented in a language which supports little to no OOP, most
> typically C
Yep. That's what I'm saying. You can do "OOP" in any language, but a
language has to support it natively for *me* to call it an "OO language."
> an OOP language for a design which has very little object-orientedness
Sure. Any time you give other processes access to all the member variables,
or have most of the routines just static functions, or etc. :-)
--
Darren New, San Diego CA, USA (PST)
I ordered stamps from Zazzle that read "Place Stamp Here".
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> > an OOP language for a design which has very little object-orientedness
> Sure. Any time you give other processes access to all the member variables,
> or have most of the routines just static functions, or etc. :-)
I think singletons are a completely valid OOP technique. (OTOH, if your
entire program consists of singletons, it becomes a bit dubious whether
your program is object-oriented at all...)
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>> > an OOP language for a design which has very little object-orientedness
>
>> Sure. Any time you give other processes access to all the member variables,
>> or have most of the routines just static functions, or etc. :-)
>
> I think singletons are a completely valid OOP technique. (OTOH, if your
> entire program consists of singletons, it becomes a bit dubious whether
> your program is object-oriented at all...)
Sure. I meant if all the objects/classes in the program have all the member
variables public and all the routines static, you're just using OO for the
modularity. Doing it that way occasionally doesn't hurt.
--
Darren New, San Diego CA, USA (PST)
I ordered stamps from Zazzle that read "Place Stamp Here".
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |