Re: limited types (Was: Records that could be arrays)
- From: "Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx>
- Date: Sun, 26 Feb 2006 10:00:07 +0100
On Sat, 25 Feb 2006 15:05:02 GMT, Matthew Heaney wrote:
"Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx> writes:
I think that there should also be [limited] containers of limited types.
For this we need a construction model, which would allow user-defined
in-place constructors. After all Ada has always had arrays of limited
components. We have to extend this model onto user-defined containers.
But you can pass in an Initialize procedure as a parameter of an insertion
operation, to perform whatever initialization needs to be done.
You mean "return .. do" for limited types. It is in-place, but a
constructing function does not have safety of a constructor. Then you
cannot ask it from the type, so it can't have a default [deduced from the
type.] It is not dispatching in Insert. What about container of
class-wides, i.e. when Node_Type should have ET'Class?
.... and of course passing pointers to functions is ugly.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.
- Follow-Ups:
- Re: limited types (Was: Records that could be arrays)
- From: Matthew Heaney
- Re: limited types (Was: Records that could be arrays)
- References:
- limited types (Was: Records that could be arrays)
- From: Thierry Bernier
- Re: limited types (Was: Records that could be arrays)
- From: Randy Brukardt
- Re: limited types (Was: Records that could be arrays)
- From: Dmitry A. Kazakov
- Re: limited types (Was: Records that could be arrays)
- From: Matthew Heaney
- limited types (Was: Records that could be arrays)
- Prev by Date: Re: Records that could be arrays
- Next by Date: Re: OT: Re: help with include and library files in GPS
- Previous by thread: Re: limited types (Was: Records that could be arrays)
- Next by thread: Re: limited types (Was: Records that could be arrays)
- Index(es):