From: Simon Wright <simon@pushface.org>
Subject: Re: overloading operators
Date: Thu, 22 Nov 2018 11:39:14 +0000
Date: 2018-11-22T11:39:14+00:00 [thread overview]
Message-ID: <ly1s7dcpel.fsf@pushface.org> (raw)
In-Reply-To: efceb3ed-048a-48d6-aee4-432b5451a679@googlegroups.com
briot.emmanuel@gmail.com writes:
>> You can always say e.g. Ada.Numerics.Real_Arrays."*" (A, B) but it is
>> rather clumsy compared to A * B!
>
> The main use I have for that notation is in expression functions in specs,
> since we try to avoid use clauses in specs. So for instance:
>
> function Greater (A, B : Some_Package.My_Type) return Some_Package.My_Type
> is (Some_Package.">" (A, B));
Good point (though return Boolean would be better :-)
Personally I try to avoid use clauses in body context clauses, too.
next prev parent reply other threads:[~2018-11-22 11:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 9:56 overloading operators hnptz
2018-11-21 11:28 ` Jeffrey R. Carter
2018-11-21 13:50 ` AdaMagica
2018-11-21 13:52 ` AdaMagica
2018-11-21 16:39 ` hnptz
2018-11-21 17:37 ` Simon Wright
2018-11-22 8:18 ` briot.emmanuel
2018-11-22 11:39 ` Simon Wright [this message]
2018-11-26 17:47 ` Anh Vo
2018-11-26 18:03 ` Simon Wright
2018-11-26 18:24 ` 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