Talk:Ada Programming/Tips

Private Types Can be Completed in the Unit's Body This is actually not true. Maybe the author was speaking about private types that are defined as access to a type declared in the private part and defined in the body. That is:

package Private_And_Body is  type Private_Type is private; private type Body_Type is private; type Private_Type is access Body_Type; end Private_And_Body;

The code samples in a tips section are mandatory so I'll add it to the page. ManuelGR 13:01, 16 Jan 2005 (UTC)

This is equivalent to C opaque pointers. I believed that it is used when in future versions the size of a data structure can grow, but I've only used it because is the sole rational approach to have real private types in C. Has someone used it? Is it interesting to add this info to the wikibook? - suruena 12:12, 7 Mar 2005 (UTC)

The following paragraph has been moved from the book to the discussion page since this feature alledged to Tucker Taft has been present in Ada since Ada 83.

These types are sometimes called "Taft types" &mdash;named after Tucker Taft, the main designer of Ada 95&mdash; because were introduced in the so-called Taft Amendment to Ada 83. In other programming languages, this technique is called "opaque pointers".

Quirks
I assume the described problem is caused by a bug of a particular GNAT version and maybe on a particular Windows version. Doesn't make sense to clarify this and add a link to the corresponding bug report? --ManuelGR (talk) 18:48, 10 June 2008 (UTC)


 * It seems like "delay 0.0" has been in wide spread use for tasking related issues (to do with synchronization points); comp.lang.ada usenet has reports on "delay 0.0" from as early as 1992. However, there is a hint in these messages that the expression was/is used to trigger a task switch, at least with a number of compilers. So maybe declaring this particular quirk a bug is less than could be done to improve the subsection. gb (talk) 11:18, 11 June 2008 (UTC)