comp.lang.ada
 help / color / mirror / Atom feed
From: doylep@ecf.toronto.edu (Patrick Doyle)
Subject: Re: Visibility and access to "public" attributes
Date: 1997/09/02
Date: 1997-09-02T00:00:00+00:00	[thread overview]
Message-ID: <EFw9rA.JwB@ecf.toronto.edu> (raw)
In-Reply-To: 01bcb787$eeb5a180$7e80400a@gavinspc


In article <01bcb787$eeb5a180$7e80400a@gavinspc>,
Gavin Collings <gcollings@sperry-sun.com> wrote:
>
> [Discussion of how Delphi can make functions use the syntax of
>  an assignment statement]
>
>Apart, perhaps, from the overhead of having to declare fRadius separately,
>this method looks certainly more flexible and probably in most interesting
>cases more direct than the Eiffel approach.

  IMO, this is equivalent to being able to do this:

class GOOBER

feature

  volume : INTEGER is do ... end

  volume := (new_value : INTEGER) is do ... end

end

  Now I could write something like this:

my_goober.volume := my_goober.volume + 1

  While apparently an assignment, this would call "volume", add 1 to
the result, and then call "volume :=" passing it the new value as
an argument.

  While this may be nice syntactic sugar, naming a feature "volume :="
seems to have virtually no advantage over "set_volume".  

 -PD
  

-- 
--
Patrick Doyle
doylep@ecf.utoronto.ca




  reply	other threads:[~1997-09-02  0:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-29  0:00 Visibility and access to "public" attributes card
1997-08-29  0:00 ` Patrick Doyle
     [not found]   ` <JSA.97Aug29190453@alexandria.organon.com>
1997-08-30  0:00     ` Patrick Doyle
1997-08-30  0:00       ` Jon S Anthony
1997-09-01  0:00         ` Patrick Doyle
1997-08-30  0:00 ` Darren New
1997-09-02  0:00 ` Don Harrison
1997-09-02  0:00   ` Don Harrison
1997-09-02  0:00     ` Jon S Anthony
1997-09-02  0:00     ` Gavin Collings
1997-09-02  0:00       ` Patrick Doyle [this message]
1997-09-02  0:00       ` Nick Leaton
1997-09-02  0:00         ` Gavin Collings
1997-09-03  0:00       ` Don Harrison
1997-09-05  0:00       ` Nick Leaton
     [not found]         ` <01bcba0e$418f7380$2001df0a@gavinspc>
1997-09-05  0:00           ` Nick Leaton
1997-09-05  0:00         ` Patrick Doyle
1997-09-02  0:00   ` Peter Horan
  -- strict thread matches above, loose matches on Subject: below --
1997-08-29  0:00 card
1997-08-29  0:00 ` Ted Velkoff
1997-08-30  0:00 ` Patrick Doyle
1997-08-30  0:00 ` Darren New
1997-09-02  0:00 card
replies disabled

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