Re: Confessions of an "OO Foreigner"

From: William M. Klein (wmklein_at_nospam.netcom.com)
Date: 12/31/03


Date: Wed, 31 Dec 2003 04:48:18 GMT


>From the 2002 Standard's "Glossary",

    "4.185 universal object reference: An object reference that is not
restricted to a specific class or interface."

from the rules for the USAGE clause,

    "14) A data item described with a USAGE OBJECT REFERENCE clause is called an
object reference. An object
reference is a data item of class object and category object-reference. It shall
contain either null or a reference
to an object, subject to the following rules: ...

    b) If none of the optional phrases is specified, this data item is called a
universal object reference. Its content
may be a reference to any object."

bottom-line (in the 2002 Standard, not necessarily in all existing
implementations) you may define a data item to be an object reference for a
SPECIFIC type of object *or* you may define it as "universal" by not telling (in
the data division) what type of object reference may be "stored" in the data
item. Or in other words, at compile time you may "limit" an object reference
(allowing early binding) or you may FORCE late binding by allowing any type of
object to be referenced in a UNIVERSAL object-reference data item.

Does this help?

-- 
Bill Klein
 wmklein <at> ix.netcom.com
"Peter E.C. Dashwood" <dashwood@enternet.co.nz> wrote in message
news:3ff210ce_5@news.athenanews.com...
>
> "Thane Hubbell" <thaneh@softwaresimple.com> wrote in message
> news:bfdfc3e8.0312301535.381e7c90@posting.google.com...
> > >
> > > Only if it is early bound (and early binding stinks IMO).
> > >
> > > Pete.
> >
> > Not true - inline method invocation works with late binding provided
> > the object reference is a universal object reference (which requires
> > late binding).
>
> What do you mean by a "universal object reference"?  (Defined in
> Factory...?)
>
> I don't understand this.
>
> I tried using inline method invocation in late bound programs and it didn't
> work. Hence my post. If you know better, I'd appreciate enlightenment.
>
>
>
> >I also disagree with you - performance wise, late
> >binding is bad.
>
> Yes, I  know that. It depends on what you mean by "bad". It is not so bad as
> to be noticeable, in the implementations I have written. I said it was my
> opinion. It is. I arrived at it after balancing the supposed "bad"
> performance against the flexibility late binding affords.
>
> >
> > Model based programming is made possible by OO.  In addition "web
> > services" are made possible by OO syntax.  SOAP means Simple OBJECT
> > Access Protocol.  With these advances OO - being Objects AS A SERVICE
> > - will fulfill its promise.
>
> That is already possible with components. "Web Services" are dependent on
> the adoption of  MS .NET and that is by no means a given...yet. SOAP is good
> but it really adds little. The same effect is attainable with DCOM+ and DTS
> (once you get them to work properly...).
>
> Your view of OO seems limited to COBOL (where I agree it has not fulfilled
> its promise yet.) In other areas and other languages it HAS fulfilled its
> promise.
>
> Pete.
>
>


Relevant Pages

  • Re: "Object reference not set to an instance of an object." error at postback
    ... My guess would be that your problem is located with your binding ... container that you mentioned towards the end of your post. ... Object reference not set to an instance of an object. ... The error message appears immediately ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Confessions of an "OO Foreigner"
    ... > Not true - inline method invocation works with late binding provided ... > the object reference is a universal object reference (which requires ... What do you mean by a "universal object reference"? ... I tried using inline method invocation in late bound programs and it didn't ...
    (comp.lang.cobol)
  • Re: Confessions of an "OO Foreigner"
    ... Not true - inline method invocation works with late binding provided ... the object reference is a universal object reference (which requires ... will fulfill its promise. ...
    (comp.lang.cobol)
  • Re: Using early-bound interface on a late-bound object
    ... > class that accepts an object reference and provides all the same ... > early bound references to either ADO or DAO so it's not quite what I think ... although where intellisense is working you still get early ... binding and where intellisense was not working you would get late binding. ...
    (microsoft.public.vb.general.discussion)