Sujet : Re: Ichbiah 2022 compiler mode
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.adaDate : 14. Sep 2024, 08:18:29
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vc3dc4$1bmhk$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Pan/0.160 (Toresk; )
On Sat, 14 Sep 2024 01:18:25 -0500, Randy Brukardt wrote:
Unfortunately, "updater" functions don't work with the Ada model of
components, because you can't tell what to do when a component appears
or disappears in an assignment.
But it’s just syntactic sugar, nothing more. Instead of
a := obj.get_prop()
obj.set_prop(a)
(both of which have valid Ada equivalents), you can unify them into
a:= obj.prop
obj.prop := a
What difference does writing it differently make?