IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New The difference.
Well, if it is all pretty much a dictionary, then that is key to my complaint about OO. What is more flexible and open-ended: an app built with the full power of RDBMS, or one based on the connection of a bunch of dictionaries? What makes a better fundimental building block: a bunch of dictionaries hand-wired together, or something using the set- and table-based relational paradigm?


The difference is threefold. First, the dictionaries are special purposed via the language's symbol tables. Secondly, they are created by the compile-time system and maintained for object instances by the run-time system. Secondly, there is a syntantic difference in utilising the paradigm in this particular way which often proves beneficial.

IOW, it is a useful abstraction.

Wade.

"Ah. One of the difficult questions."

New Re: The difference
The difference is threefold. First, the dictionaries are special purposed via the language's symbol tables. Secondly, they are created by the compile-time system and maintained for object instances by the run-time system. Secondly, there is a syntantic difference in utilising the paradigm in this particular way which often proves beneficial. IOW, it is a useful abstraction.

I couldn't get anything concrete out of this description. The "compile-time" reference seems kind of language-specific, for many OO languages have no compile-time (and we don't want yet another static-vs-dynamic debate breaking out). Examples would be helpful.
________________
oop.ismad.com
New Okay, I'll try again.
By "compile-time" I meant during the process of parsing and lexing the source code into something that could be considered executable, be it some sort of byte-code or real machine code. A lot of what are often considered scripting languages do this every time they run a program - Perl, for instance. However, in the following description I would prefer you think in the context of a C++ compiler as it has a more conventional compile cycle.

This process normally populates a number of symbol tables for various items: variables, functions, classes and objects. The intermediate representation of the code relies on these symbol tables to know what the data it points to is for, contains and is allowed to do. Thus, our first dictionary.

The second dictionary mapping takes place when we examine those symbol tables a little more closely. Classes with methods would effectively get their own symbol table* for their calls. Calls to those class methods would get replaced with a compact representation to that symbol table entry. We now have our second dictionary.

Now some of this information needs to stick around after the parsing and lexing is complete. Why is that? Well, the first answer is idiotically simple: external functions need to be link-edited by name. :-) Slightly more advanced we might have functions of our own that need to be made visible - again by name - to other compiled modules. A third dictionary, though not one pertaining directly to OO.

However, there is some remaining symbol table information required for runtime behaviour. And that is for a technique called dynamic dispatch. From a dictionary point of view, dynamic dispatch says that if a function call can't find its function in the dictionary attached to it's object, it can look in the dictionary attached to its parent object. This information is taken from our second dictionary type to create a fourth.

At this point we come to the point I was originally making. All of these dictionaries are intended for performing a fairly specific function of mapping names to information. They generally function fairly invisibly and scale up and down usually more than enough to suit their specific purpose. At no point are they general purpose dictionaries. Instead, the fact they are really dictionaries - and, in fact, that there are quite a number of them - is abstracted beneath the slightly more specific role they perform. Like symbol table lookup. Or dynamic dispatch.

Thinking of polymorphism, inheritance, dynamic dispatch and other aspects of object-oriented or object-aware programming as dictionary-based logic is an interesting academic exercise, but IMHO reducing the former to the latter is a distinct step backwards.

Wade.

* Whether or not this really happens is actually an implementation detail and is unimportant to this discussion.

Appendix.

I should re-iterate that I'm a fan of clever decision trees in my logic. Handing a function pointer to a piece of code to change its behaviour I find preferable to coding in a huge switch() statement. Code that can do wildly different yet oddly similar tasks based on what its initial data is appeals strongly to me. Taking advantage of object inheritance and programmable code in the parent code is one such powerful tool. It makes my code smaller and smarter.

Edit: Corrected a noun's state in the footnote to reflect what I originally meant to type. Bryce didn't even notice...

"Ah. One of the difficult questions."

Expand Edited by static Dec. 26, 2002, 03:42:13 AM EST
New re: Okay, I'll try again.
I should re-iterate that I'm a fan of clever decision trees in my logic.

Because they better map to the external world, or your particular mind?

its behaviour I find preferable to coding in a huge switch() statement.

A huge switch statement is sometimes a sign that a Control Table is needed. You should have anticipated I would say that. I guess I should troll here more often to keep you guys fresh.

It makes my code smaller and smarter.

I'll beleive it when I see it. I don't get why people like OO. I see no magic anywhere. The simplicity and beauty of shape, animal, stack, and device-driver examples just does not project into real world projects. It is like it is optimized for another universe.
________________
oop.ismad.com
New Go troll elsewhere. (new thread)
Created as new thread #70893 titled [link|/forums/render/content/show?contentid=70893|Go troll elsewhere.]

"Ah. One of the difficult questions."

     A relational definition of OOP - (tablizer) - (62)
         It makes sense to me but also - (boxley)
         Pretty much correct - (tuberculosis) - (58)
             re: Pretty much correct - (tablizer) - (57)
                 The difference. - (static) - (4)
                     Re: The difference - (tablizer) - (3)
                         Okay, I'll try again. - (static) - (2)
                             re: Okay, I'll try again. - (tablizer) - (1)
                                 Go troll elsewhere. (new thread) - (static)
                 Its whats in the dictionaries that is interesting - (tuberculosis) - (41)
                     Re: Its whats in the dictionaries that is interesting - (deSitter) - (1)
                         Its very similar - (tuberculosis)
                     marrying data and behavior - (tablizer) - (38)
                         Re: marrying data and behavior - (tuberculosis) - (37)
                             Re: marrying data and behavior - (tablizer) - (36)
                                 Got it - (tuberculosis) - (35)
                                     you are not weighing the whole kitten kabootal - (tablizer) - (34)
                                         Kitten Kabootal?? Is that some stripper you know? - (deSitter) - (2)
                                             Don't I wish :-) -NT - (tablizer)
                                             I know her! great smile and a grinning kabootal! -NT - (boxley)
                                         Sure I am - but you're not - (tuberculosis) - (30)
                                             Wow! If this woun't get through, nothing can. - (Arkadiy)
                                             LISP - Lists + Relational - (tablizer) - (28)
                                                 Gets you Smalltalk - (tuberculosis) - (26)
                                                     Thanks! 1 topic down, Googolplex-1 to go. :-) -NT - (Another Scott) - (24)
                                                         For Bryce, this is pretty much the only topic he discusses - (tuberculosis) - (23)
                                                             That is not true - (tablizer) - (22)
                                                                 Not to mention sheet music conventions/annotations. :) -NT - (a6l6e6x) - (21)
                                                                     Woah - sheet music - I haven't seen that stuff in years... - (tuberculosis) - (20)
                                                                         Playing by ear - (Steve Lowe) - (8)
                                                                             ObAol MeToo (tm) - (Meerkat) - (7)
                                                                                 Re: ObAol MeToo (tm) - (deSitter) - (6)
                                                                                     I can read music, I'm just really slow at it. -NT - (Meerkat) - (5)
                                                                                         That's really interesting. - (static) - (3)
                                                                                             Speed-reader here - (drewk) - (1)
                                                                                                 You're a drummer? Cool! -NT - (deSitter)
                                                                                             I use chord charts a lot - (Steve Lowe)
                                                                                         Same here. - (admin)
                                                                         Todd, Steve, guys - just a well-meaning tip: - (CRConrad) - (10)
                                                                             CRC, Just a Well Meaning Tip.. - (deSitter) - (6)
                                                                                 What's annoying as Hell is pompous know-it-alls, and... - (CRConrad)
                                                                                 Bar table load times aren't affected by size of past chat -NT - (admin) - (4)
                                                                                     That's the legitimate use - (deSitter) - (3)
                                                                                         Naah, you're missing the REAL use: - (CRConrad) - (2)
                                                                                             Re: Naah, you're missing the REAL use: - (deSitter) - (1)
                                                                                                 OK, that last point is one we can agree on, at least! :-) -NT - (CRConrad)
                                                                             If I had any idea this would be so hot - (tuberculosis)
                                                                             Well meaning tip - (Steve Lowe) - (1)
                                                                                 Long as you knew you "prolly shoulda", that's all I wanted. -NT - (CRConrad)
                                                     But I get juiced-up dispatching, et al. - (tablizer)
                                                 Re: LISP - Lists + Relational - (deSitter)
                 re: Pretty much correct - (johnu) - (9)
                     "Data" is whatever you make it - (tablizer) - (8)
                         Re: "Data" is whatever you make it - (johnu) - (7)
                             complexity of Java is not a selling point - (tablizer)
                             I wouldn't bother, John. - (static) - (5)
                                 No,YOU don't get it: 1-1-1 is Limiting - (tablizer) - (4)
                                     *sigh* Since you asked... - (static) - (3)
                                         shoeboxes, pencils, and strips of paper - (tablizer) - (2)
                                             Read everything again. Yes, the whole thread. - (static) - (1)
                                                 You are still thinking in code - (tablizer)
         Re: A relational definition of OOP - (deSitter) - (1)
             Re: A relational definition of OOP - (JimWeirich)

GAWD have these people never used SOFTWARE before!!!!!!!!!!
87 ms