comp.lang.ada
 help / color / mirror / Atom feed
* Difference between F(X, ...) and X.F(...)
@ 2016-11-19 14:17 Victor Porton
  2016-11-19 14:34 ` Robert Eachus
  0 siblings, 1 reply; 4+ messages in thread
From: Victor Porton @ 2016-11-19 14:17 UTC (permalink / raw)


In Ada2012 Is there any difference between

F(X, ...)

and

X.F(...)

provided that X is a value of a tagged type of class-wide type?	

-- 
Victor Porton - http://portonvictor.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Difference between F(X, ...) and X.F(...)
  2016-11-19 14:17 Difference between F(X, ...) and X.F(...) Victor Porton
@ 2016-11-19 14:34 ` Robert Eachus
  2016-11-19 14:51   ` AdaMagica
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Eachus @ 2016-11-19 14:34 UTC (permalink / raw)


On Saturday, November 19, 2016 at 9:17:49 AM UTC-5, Victor Porton wrote:
> In Ada2012 Is there any difference between
> 
> F(X, ...)
> 
> and
> 
> X.F(...)
> 
> provided that X is a value of a tagged type of class-wide type?	

The overload resolution rules are different.  Of course, anytime that difference actually matters in code--other than compiler tests--is pretty silly.  For example, X could have a component F which is an array with arguments compatible with the function F...


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Difference between F(X, ...) and X.F(...)
  2016-11-19 14:34 ` Robert Eachus
@ 2016-11-19 14:51   ` AdaMagica
  2016-11-19 15:32     ` Dmitry A. Kazakov
  0 siblings, 1 reply; 4+ messages in thread
From: AdaMagica @ 2016-11-19 14:51 UTC (permalink / raw)


Also visibility is different. This affects the context clauses (with-clauses) needed.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Difference between F(X, ...) and X.F(...)
  2016-11-19 14:51   ` AdaMagica
@ 2016-11-19 15:32     ` Dmitry A. Kazakov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry A. Kazakov @ 2016-11-19 15:32 UTC (permalink / raw)


On 2016-11-19 15:51, AdaMagica wrote:
> Also visibility is different. This affects the context clauses (with-clauses) needed.

Pointers are transparent for dotted notation, e.g. if X is an access to 
T'Class.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-19 15:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-19 14:17 Difference between F(X, ...) and X.F(...) Victor Porton
2016-11-19 14:34 ` Robert Eachus
2016-11-19 14:51   ` AdaMagica
2016-11-19 15:32     ` Dmitry A. Kazakov

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