Skip to content

Commit

Permalink
Merge pull request #1176 from gusthoff/content/ada_idioms/review/edit…
Browse files Browse the repository at this point in the history
…orial/general/20250124

Editorial change: various changes to "Ada Idioms" course
  • Loading branch information
gusthoff authored Jan 25, 2025
2 parents c5dd329 + 7259e13 commit 8db3e96
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 130 deletions.
238 changes: 119 additions & 119 deletions content/courses/ada-idioms/chapters/abstract_data_machines.rst

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Abstract Data Types
Motivation
----------

In the
In the
:ref:`Groups of Related Program Units <Ada_Idioms_Groups_Of_Related_Program_Units>` idiom,
client compile-time visibility to the type's representation is both an
advantage and a disadvantage. Visibility to the representation makes available
Expand Down
2 changes: 2 additions & 0 deletions content/courses/ada-idioms/chapters/appendices.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

:next_state: False

Appendices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ and again in the type completion in the package private part:

type Device is tagged limited record ... end record;

We declare :ada:`Device` as a limited type because we want to preclude
assignment statements for client objects of the type. Assignment of the
enclosing record object would leave the PO Encloser discriminant
designating the prior (right-hand side) enclosing object. If the PO is
written with the assumption that the enclosing object is always the one
identified during creation of the PO, that assumption will no longer
We declare :ada:`Device` as a limited type because we want to preclude
assignment statements for client objects of the type. Assignment of the
enclosing record object would leave the PO Encloser discriminant
designating the prior (right-hand side) enclosing object. If the PO is
written with the assumption that the enclosing object is always the one
identified during creation of the PO, that assumption will no longer
hold. We didn't state it up-front, but that is the assumption underlying
the idiom as described, and in fact, only limited types may have
a component that uses the :ada:`Access` attribute in this way.
Expand Down
3 changes: 1 addition & 2 deletions content/courses/ada-idioms/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Ada Idioms

.. container:: content-copyright

Copyright © 2024, AdaCore
Copyright © 2025, AdaCore

This book is published under a CC BY-SA license, which means that you
can copy, redistribute, remix, transform, and build upon the content
Expand Down Expand Up @@ -115,4 +115,3 @@ Ada Idioms
Providing Component Access to Enclosing Record Objects <chapters/component_access_to_rec_objs>
Interrupt Handling <chapters/interrupt_handling>
Reducing Object Code from Generic Package Instantiations <chapters/reducing_object_code_from_generic_package_instantiations>
Appendices <chapters/appendices>
1 change: 0 additions & 1 deletion content/hidden.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
courses/advanced-spark
courses/ada-idioms
1 change: 1 addition & 0 deletions content/hidden_contents.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ courses/advanced-ada/parts/initialization/*.*
courses/advanced-ada/parts/abstraction-oriented_prog/*.*
courses/advanced-ada/parts/design_by_contracts/*.*
courses/advanced-ada/index_hidden.rst
courses/ada-idioms/chapters/appendices.rst
2 changes: 1 addition & 1 deletion content/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@

Introduction to Ada <courses/intro-to-ada/index>
Advanced Journey With Ada <courses/advanced-ada/index>
Ada Idioms <courses/ada-idioms/index>
Introduction to SPARK <courses/intro-to-spark/index>
Introduction to Embedded Systems Programming <courses/intro-to-embedded-sys-prog/index>
What's New in Ada 2022 <courses/whats-new-in-ada-2022/index>
Expand All @@ -100,7 +101,6 @@
:caption: Upcoming Courses

Advanced Journey With Ada (UNPUBLISHED) <courses/advanced-ada/index_hidden>
Ada Idioms <courses/ada-idioms/index>
Advanced SPARK <courses/advanced-spark/index>

.. toctree::
Expand Down

0 comments on commit 8db3e96

Please sign in to comment.