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 Re: Any OO-heads want to corroborate this?
My rule of thumb:

- Capture differences in data in data (hmmm ... kinda obvious)
- Capture differences in behavior in classes

--
-- Jim Weirich jweirich@one.net [link|http://w3.one.net/~jweirich|http://w3.one.net/~jweirich]
---------------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
New Bryce wants to make the methodDictionary a table.
Its not a fundamentally different structure than any other home-grown object system, but he's pretty much into creating something like self but putting all the behavior as eval scripts in a table.



"Packed like lemmings into shiny metal boxes.
Contestants in a suicidal race."
    - Synchronicity II - The Police
Expand Edited by tuberculosis Aug. 21, 2007, 06:08:23 AM EDT
New relational model of OOP
A basic OO structure:
\n   Table: Objects\n   --------------\n   Object_name\n   Parent  \n\n   Table: Method_attributes\n   -----------------------\n   Object_name  (foreign key to Objects table)\n   Message_name (attribute or method name)\n   Value_type   (method, attribute, or pointer indicator)\n   The_value    (attribute value or algorithm)\n


It could be made fancier, such as multiple inheritance, etc.
________________
oop.ismad.com
New Been there, done that, have the MI t-shirt.
[link|http://web.archive.org/web/20010718000433/w3.one.net/~jweirich/oostuff/foxpro.html|*yawn*]
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New monomorphism
If you use tables to do OOP, you get long ugly code like that. The trick is to use tables to do table stuff, not OOP. In the real world, splitting entities into subtypes does not work very well: there are too many orthogonal and often equally valid ways to "divide" something. Thus, rather than make one factor the arbitrary king (division criteria) and demote the others, simply don't divide. You query to get as-need "divisions", not hard-wire them into your physical code structure. OO'ers are often too quick to force things into taxonomies, which upon philosophical inspection or hindsite are usually arbitrary or specific to a narrow use of the entity. This is what happens when you over emphasize use-cases or CRC cards, for one.
________________
oop.ismad.com
New Re: monomorphism
First of all: way to miss the point. You mentioned that multiple inheritance could be added; I gave an example. Sheesh.

In the real world, splitting entities into subtypes does not work very well: there are too many orthogonal and often equally valid ways to "divide" something.
Then don't do that. We've been over this before. Subtyping is not the end-all be-all of OO design. And don't give me that "most people are taught inheritance only" crap. Their (and your) ignorance is a commentary on their education only, not on OO. Further exploration of this topic will be ignored, as We Have Been Over It Before.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New If you remove inheritance
...then OO is little more than bloated procedural, or a 60's style navigational database built from scratch.
________________
oop.ismad.com
New I didn't say remove it.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Perhaps "ignore" is more appropriate
________________
oop.ismad.com
New I didn't say that either.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Re: monomorphism
This is actually interesting!

By "table", you really mean "array" - and so what you want is efficient indexing. So look at APL.
-drl
New APL is not the only way to get efficient indexing
Machine efficiency is not the whole issue. Maybe check out:
[link|http://www.c2.com/cgi/wiki?CodeAvoidance|http://www.c2.com/cgi/wiki?CodeAvoidance]
________________
oop.ismad.com
New Do you finally admit
..that OOP is a method - a particular cooridinate system? Then we can talk about your array-centric language, as another coordinate system.

If you're so radical anyway, why don't you make something that fits naturally on a stack machine?
-drl
New why?
If you're so radical anyway

I am not "radical". I get emails from people who have similar ideas all the time, and many shops I have worked at are heavy users of RDMBS. (True, they perhaps are more likely to hire/rent table-heads than average.)

that OOP is a method - a particular cooridinate system....why don't you make something that fits naturally on a stack machine?

Anything could probably be *implemented* as a stack and/or a coordinate system and/or gerbals on gears. Stanford students built a computer out of only tinkertoys. However, I am more concerned about an app developer's interface (as languages and/or tools), not compiler writing/implementing.
________________
oop.ismad.com
New Yes you are
You're radical, because you are doing "root level" work (look up the word "radix"). You want to invoke new methods. So I ask again - do you admit that OOP is a technique, and not a theory?
-drl
New radix is the "bucket sort"
because you are doing "root level" work (look up the word "radix").

I am not implementing a sort algorithm. How the database does its lookups is hidden from the DB user.

So I ask again - do you admit that OOP is a technique, and not a theory?

The distinction is blurry.

________________
oop.ismad.com
New Delta Dawn
Capture differences in behavior in classes

I have not seen an example of OO doing this well. For example, the granularity of the differences is often smaller than the existing methods or classes. You often cannot override 1/3 of a method without shuffling around a lot of code or having jillions of little classes.

Further, "regular" differences in behavior can often be converted into differences in data, and the irregular ones make OO barf or a convoluted mess.
________________
oop.ismad.com
New You can't override a third of an eval string either.



"Packed like lemmings into shiny metal boxes.
Contestants in a suicidal race."
    - Synchronicity II - The Police
Expand Edited by tuberculosis Aug. 21, 2007, 06:10:20 AM EDT
New Sure you can!
From his OO model in the other post:

eval(substr(the_value, 1, (2 * len(the_value)) / 3) + "new code");

See? It's EASY!!!

Or, if you want to override the MIDDLE part:

eval(substr(the_value, 1, len(the_value)) / 3) + "new code" + substr(the_value, (2 * len(the_value)) / 3, len(the_value)));

How simple can it be??

*urrgghhle* *thump*

^___^___^___^____________________________________________...

(Dr. Jones, to the programmers' cubicles, stat...)
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
Expand Edited by admin April 30, 2003, 06:44:40 PM EDT
New Offensive
This_prepending_of_"the_". I hate that. Is that supposed to be cool?

-drl
New Not to me.
Talk to Bryce. [link|/forums/render/content/show?contentid=99516|It's his name].

And if you thought it was my naming convention, then I suggest that you stop your irritating insistence that I do things to be "cool". Your stereotyping is tiresome, unwarranted, and offensive. If not, then talk to Bryce. ;-)
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Re: Not to me.
It's a honest question! I remember being a cool programmer - not recently though. There are these idioms that keep coming up - needless "voluntary syntax". It's a way of talking in code, so it's bound to have a "cool" aspect, like all other forms of communication.

-drl
New Again:
I don't do things like that to be cool.

I use naming conventions and idioms for maintainability, efficiency, readability, and any number of other -ys -- but not to be cool.

The only exception being unit testing data values. :-)

YMMV.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Don't know about cool
but I've been known to name globals/singletons that way. theEventDispatcher, theThreadPool, theMousePointer etc...

It kind of makes the point that there's only one.

Its also a HyperCard convention for global functions. ie

get the date.
put it into card field "Today"
put the selection into the message box

Lovely language, that.



"Packed like lemmings into shiny metal boxes.
Contestants in a suicidal race."
    - Synchronicity II - The Police
Expand Edited by tuberculosis Aug. 21, 2007, 06:11:07 AM EDT
New Logical reason for "the" prefix
It avoids clashing with reserved words. I have ran into column or table names that confuse SQL parsers due to commonly used names. By appending "the" to titles like "value", "description", "timestamp", etc., conflict is reduced and portability improved. I have ran into such overlaps more than once.
________________
oop.ismad.com
New lack of response means you agree now?
________________
oop.ismad.com
New You're creeping me out MAN!



"Packed like lemmings into shiny metal boxes.
Contestants in a suicidal race."
    - Synchronicity II - The Police
Expand Edited by tuberculosis Aug. 21, 2007, 06:11:09 AM EDT
New /me blows tea through my nose!
Stop that...goddammit!

;-)
jb4
"We continue to live in a world where all our know-how is locked into binary files in an unknown format. If our documents are our corporate memory, Microsoft still has us all condemned to Alzheimer's."
Simon Phipps, SUN Microsystems
New If you don't split things into "subtypes" you don't need to
________________
oop.ismad.com
New I think it might get more complicated than that.
Though that's a good start. The trick lies in identifying when apparantly different behaviour is in fact only different because of some related data - which can thus be abstracted away.

Wade.

Is it enough to love
Is it enough to breathe
Somebody rip my heart out
And leave me here to bleed
 
Is it enough to die
Somebody save my life
I'd rather be Anything but Ordinary
Please

-- "Anything but Ordinary" by Avril Lavigne.

     Another Table-head is allowed to write - (tablizer) - (37)
         This is news how? - (static) - (34)
             Many OO-heads would rather make 200 classes -NT - (tablizer) - (33)
                 Any OO-heads want to corroborate this? - (static) - (32)
                     We've already had this conversation with him. - (admin) - (1)
                         Yes, that's what I thought someone would say. :-) -NT - (static)
                     Re: Any OO-heads want to corroborate this? - (JimWeirich) - (29)
                         Bryce wants to make the methodDictionary a table. - (tuberculosis) - (14)
                             relational model of OOP - (tablizer) - (13)
                                 Been there, done that, have the MI t-shirt. - (admin) - (12)
                                     monomorphism - (tablizer) - (11)
                                         Re: monomorphism - (admin) - (4)
                                             If you remove inheritance - (tablizer) - (3)
                                                 I didn't say remove it. -NT - (admin) - (2)
                                                     Perhaps "ignore" is more appropriate -NT - (tablizer) - (1)
                                                         I didn't say that either. -NT - (admin)
                                         Re: monomorphism - (deSitter) - (5)
                                             APL is not the only way to get efficient indexing - (tablizer) - (4)
                                                 Do you finally admit - (deSitter) - (3)
                                                     why? - (tablizer) - (2)
                                                         Yes you are - (deSitter) - (1)
                                                             radix is the "bucket sort" - (tablizer)
                         Delta Dawn - (tablizer) - (12)
                             You can't override a third of an eval string either. -NT - (tuberculosis) - (11)
                                 Sure you can! - (admin) - (9)
                                     Offensive - (deSitter) - (6)
                                         Not to me. - (admin) - (3)
                                             Re: Not to me. - (deSitter) - (2)
                                                 Again: - (admin)
                                                 Don't know about cool - (tuberculosis)
                                         Logical reason for "the" prefix - (tablizer) - (1)
                                             lack of response means you agree now? -NT - (tablizer)
                                     You're creeping me out MAN! -NT - (tuberculosis)
                                     /me blows tea through my nose! - (jb4)
                                 If you don't split things into "subtypes" you don't need to -NT - (tablizer)
                         I think it might get more complicated than that. - (static)
         Re: Another Table-head is allowed to write - (johnu) - (1)
             A: slower response time? - (jb4)

When someone asks you if you're a god, you say YES!
141 ms