comp.lang.ada
 help / color / mirror / Atom feed
* Sam Harbaugh's generic string package
@ 1987-11-30 18:52 Jim Moody, DCA C342
  0 siblings, 0 replies; only message in thread
From: Jim Moody, DCA C342 @ 1987-11-30 18:52 UTC (permalink / raw)


Let me suggest an hypothesis.  Ada/Ed has got the right line for the
error, but the wrong part of the LRM.  7.4.1(4) imposes restrictions
on the use of a nmae of a private type prior to the full declaration.
It is possible that the implementations which reject Sam's package do
so thinking it violates 7.4.1(4), since to resolve the ambiguity of
which "=" is meant requires that the compiler implicitly use the name
of the private type in an illegal manner (?!).
The nice thing about this hypothesis is that it's testable.  If in the 
nested generic, the function declaration is truncated to a function 
specification, and the actual renaming postponed to the package body
(inside the package body), the putative violation of 7.4.1(4) would
disappear and the thing should compile.  Since I don't have one of 
the compilers which rejected the package, I can't perform the 
experiment.  Would someone like to try?
WWhether such code does violate 7.4.1(4) is a nice question.  It violates
tion.  My best
answer is that it vioates the spirit but not the letter.  Can someone 
come up with a better resolution.
Jim.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1987-11-30 18:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1987-11-30 18:52 Sam Harbaugh's generic string package Jim Moody, DCA C342

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