comp.lang.ada
 help / color / mirror / Atom feed
From: Florian Weimer <someone@deneb.cygnus.argh.org>
Subject: Re: Objects properties -  Ada design issues question
Date: 2000/02/04
Date: 2000-02-04T18:53:46+00:00	[thread overview]
Message-ID: <877lgklryd.fsf@deneb.cygnus.argh.org> (raw)
In-Reply-To: s9ljhv6jdh127@corp.supernews.com

"Vladimir Olensky" <vladimir_olensky@yahoo.com> writes:

>         A : [property]  constant Integer;
>         B : [property]  Integer;

Using [] isn't a good idea, because it doesn't fit Ada very well.
(This character isn't used by the language now, perhaps that's why
you chose it.)  In addition, I would preserve [] (and @) for Objective
Ada. ;)

Microsoft patented the [] construct (for preventing clashes with
existing syntax and keywords) several years ago, BTW.

> It would be very interesting to hear different  opinions
> regarding this  "objects properties" issue and it's
> prospective of being implemented in future Ada revisions.
> As was shown this could be done without changing current
> Ada syntax.

Why are Get/Set subprograms inferior to this approach?  IMHO, this is
just syntactic sugar of very questionable quality.  It doesn't make
sense to me to write:

        Some_Label.Width  := New_Width;
        Some_Label.Height := New_Height;

instead of:

        Resize (Some_Label, Width => New_Width, Height => New_Height);

The latter one is much more explicit and immediately suggests that
some kind of operation takes place.

Finally, use of properties seems to be rather restricted to visual GUI
design, and there are some technical reasons for it in this region.
For example, in Delphi, they aren't mere syntactic sugar, but they
provide some kind of introspection feature needed by the GUI design tool
(which has to present the properties of, say, a label to the developer
so that he can make adjustments).




  parent reply	other threads:[~2000-02-04  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-04  0:00 Objects properties - Ada design issues question Vladimir Olensky
2000-02-04  0:00 ` Matthew Heaney
2000-02-04  0:00 ` Vladimir Olensky
2000-02-04  0:00 ` Florian Weimer [this message]
2000-02-04  0:00   ` Vladimir Olensky
2000-02-06  0:00     ` Andy
2000-02-07  0:00       ` Vladimir Olensky
2000-02-10  0:00         ` Andy
2000-02-08  0:00     ` Florian Weimer
2000-02-04  0:00   ` Vladimir Olensky
2000-02-04  0:00   ` Samuel T. Harris
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox