comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Runtime startup code for the GNAT Runtime...and a bit of humble pie.
Date: Tue, 26 Mar 2013 19:27:29 -0700 (PDT)
Date: 2013-03-26T19:27:29-07:00	[thread overview]
Message-ID: <60c750f9-8d76-41a0-b1f2-f43f93c46d6a@googlegroups.com> (raw)
In-Reply-To: <b6ba45c4-3af6-464a-a588-308da20234d6@googlegroups.com>

On Tuesday, March 26, 2013 6:28:51 PM UTC-6, Diogenes wrote:
> 
> So I figure I might just be better off writing my own implementations of these things that have NO circular dependencies.

Circularity can certainly be a bad thing, the problem is likely that they (GNAT) didn't explain the circularity well. {And it's perfectly possible to have two package bodies dependent on the other's spec w/o a circularity in the spec structure.} There is, however, one spot that I've used it to a good degree to simplify things: in my LISP interpreter (made as an an intro to Ada 2012) I have two packages branching out from the base LISP which are mutually dependent: LISP.Lists and LISP.Elements -- each defining their respective objects and the operations on them. {List.Head returns an element and Element.As_List/To_List return lists.}

Though what I've found really useful in that project is private packages. {I use it to handle strings internally, keeping that from being exposed to the user.}

> One specific goal of my runtime is a clear hierarchy that progress directly from ada.ads out to the leaf packages(nodes). No circular deps. No package should depend on another package that depends on the first package.
> 
> This structure should take about %60 of the teeth gnashing out of the porting process.

I like that idea. One thing that might prove interesting is using generic packages: say for holding the definitions of those primitive/overridable functions you mentioned {clone(), futex(), etc} in its formal-parameters. That might also be an interesting way to handle different instruction-sets -- having the parameter link a lowish-level idea to the instruction [or several instructions]. It might be a way to achieve a compiler that's easier to retarget.


  reply	other threads:[~2013-03-27  2:27 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 20:59 Runtime startup code for the GNAT Runtime...and a bit of humble pie Diogenes
2013-03-18 21:14 ` Robert A Duff
2013-03-19  0:07 ` Diogenes
2013-03-19 10:04   ` Brian Drummond
2013-03-19 12:51     ` Simon Clubley
2013-03-19 18:16       ` Ludovic Brenta
2013-03-20  1:05         ` Simon Clubley
2013-03-20 10:13           ` Mike H
2013-03-20 20:44             ` Ludovic Brenta
2013-03-19 21:43       ` Randy Brukardt
2013-03-20  8:24         ` Dmitry A. Kazakov
2013-03-21  0:16           ` Randy Brukardt
2013-03-21 19:08             ` Shark8
2013-03-21 23:34               ` Randy Brukardt
2013-03-22 16:39                 ` Jacob Sparre Andersen
2013-03-23 10:56                   ` Thomas Løcke
2013-03-19 23:13       ` Brian Drummond
2013-03-20  0:54         ` Simon Clubley
2013-03-20 11:50           ` Brian Drummond
2013-03-20 13:18             ` Simon Clubley
2013-03-26 11:04               ` Brian Drummond
2013-03-26 22:38                 ` Simon Clubley
2013-03-27 11:34                   ` Brian Drummond
2013-03-27 14:38                     ` Simon Clubley
2013-03-27 22:58                       ` Brian Drummond
2013-03-20 14:17           ` Lucretia
2013-03-20 15:00             ` Lucretia
2013-03-21 16:39             ` Brian Drummond
2013-03-23  4:35 ` Diogenes
2013-03-26 21:27 ` Diogenes
2013-03-26 21:57   ` Shark8
2013-03-27  0:28     ` Diogenes
2013-03-27  2:27       ` Shark8 [this message]
2013-03-27 10:05       ` Brian Drummond
2013-03-27 12:23         ` Simon Wright
2013-03-27 19:07   ` Randy Brukardt
2013-03-27 21:10     ` Diogenes
replies disabled

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