From: "G.B." <bauhaus@notmyhomepage.invalid>
Subject: Re: Experimenting with the OOP features in Ada
Date: Tue, 3 Jan 2017 18:07:28 +0100
Date: 2017-01-03T18:07:28+01:00 [thread overview]
Message-ID: <o4glll$50p$1@dont-email.me> (raw)
In-Reply-To: <o4gcji$4qr$1@gioia.aioe.org>
On 03/01/2017 15:31, Dmitry A. Kazakov wrote:
> On 2017-01-03 14:57, Laurent wrote:
>> Item.Name.Set (Name=>"Something") looks better than
>>
>> Item.Name := My_Strings.Handle.Create (Value => Name);
>
> Some people like using unary "+" for this. E.g.
>
> function "+" (Value : String) return My_Safe_String
> renames My_Strings.Handle.Create;
>
> Then you can do:
>
> Item.Name := +"Something";
Using an operator seems always a good idea when the language
does not otherwise support a ubiquitous notion such as a handle.
Otherwise, both the domain data types and data handling
types are indistinguishable, language-wise, and the reader
is left in daze: is this program text about handles or is
it about data?
next prev parent reply other threads:[~2017-01-03 17:07 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-02 13:21 Experimenting with the OOP features in Ada Laurent
2017-01-02 14:11 ` Brian Drummond
2017-01-02 14:43 ` Brian Drummond
2017-01-02 16:27 ` Laurent
2017-01-03 13:01 ` Brian Drummond
2017-01-03 13:57 ` Laurent
2017-01-03 14:31 ` Dmitry A. Kazakov
2017-01-03 17:07 ` G.B. [this message]
2017-01-03 20:42 ` Dmitry A. Kazakov
2017-01-04 12:18 ` Laurent
2017-01-04 12:44 ` Dmitry A. Kazakov
2017-01-05 11:41 ` Laurent
2017-01-05 13:02 ` Dmitry A. Kazakov
2017-01-05 13:11 ` AdaMagica
2017-01-04 15:09 ` Shark8
2017-01-05 11:54 ` Laurent
[not found] ` <85ef59f3-bcbe-4630-9b4d-8285623ab456@googlegroups.com>
2017-01-03 12:48 ` Brian Drummond
2017-01-03 13:43 ` Laurent
2017-01-02 15:54 ` Laurent
2017-01-02 16:41 ` Dmitry A. Kazakov
2017-01-02 18:50 ` Laurent
2017-01-02 20:55 ` Dmitry A. Kazakov
2017-01-03 13:39 ` Laurent
2017-01-03 14:40 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox