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: Two points - well, you're half right.
1) Correct, but this has nothing to do with the point I was making.

2) Incorrect. In Oracle 8 there is one constructor, which takes all of the object's members as arguments. This is required as you may not set default values for arguments in the constructor. The workaround is to create static factory methods (NOT constructors) that internally create default values and call the system constructor with all of the attributes set appropriately.

I'm not quite sure why you called this "polymorphic", either. There ain't no sich thang in Oracle 8i. What you're talking about is "overloading", which can be done in 9.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New "Static factory methods", constructors - what's the diff? (new thread)
Created as new thread #143210 titled [link|/forums/render/content/show?contentid=143210|"Static factory methods", constructors - what's the diff?]


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
You know you're doing good work when you get flamed by an idiot. -- [link|http://www.theregister.co.uk/content/35/34218.html|Andrew Wittbrodt]
New You're right...
I was thinking of the parameter passing aspect of PL/SQL (from 7+), not the constructor aspect they added in later on.

You're quite correct also, that I'm thinking of overload rather than polymorphism. I had also switched from Oracle to Java (because I still don't think of PL/SQL as OO language).

I'm not sure that a static factory method would be required in this case for Java, if the constructor can be overloaded to default the values.
New Not required in Java.
The default constructor in Java sets no values at all, in fact.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
     Constructor with 29 parameters - (bluke) - (20)
         **boggle** - (deSitter)
         Depending on the language... - (admin) - (12)
             LRPD - (deSitter)
             This is written in Java - (bluke) - (5)
                 Nasty. -NT - (admin)
                 Brings back bad memories - (deSitter) - (1)
                     Interesting point - (bluke)
                 Re: Is written in Java? - (dlevitt) - (1)
                     Yes, by people with C/C++ (MFC) experience -NT - (bluke)
             Two points - (Simon_Jester) - (4)
                 Re: Two points - well, you're half right. - (admin) - (3)
                     "Static factory methods", constructors - what's the diff? (new thread) - (CRConrad)
                     You're right... - (Simon_Jester) - (1)
                         Not required in Java. - (admin)
         29 parameters, all positional? - (ben_tilly) - (1)
             You got it - (bluke)
         Kill the author - (tuberculosis) - (1)
             No one there would understand - (bluke)
         A dictionary array is nice for such -NT - (tablizer)
         Try partial application wrappers? -NT - (FuManChu)

It's all fun and games until someone loses a lung.
82 ms