You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently we've had the scenario of an AdaCore engineer (relatively new to Ada) trying to invoke an Ada library from a C main and the engineer couldn't figure out why there was uninitialised data. For anyone new to Ada the concept of elaboration and the runtime mechanics of how it actually works (the encapsulation of the calls makes it appear to just happen by magic!) can be non-intuitive. It feels to me like something that could also cause external engineers to trip up and therefore should be included in basic tutorials, or at least mentioned with a reference to the relevant section on an advanced course.
At the very least the main.c example in Calling Ada subprograms in C should be calling adainit and adafinal. As it's currently written it's not correct code for use with our compilers.
Recently we've had the scenario of an AdaCore engineer (relatively new to Ada) trying to invoke an Ada library from a C main and the engineer couldn't figure out why there was uninitialised data. For anyone new to Ada the concept of elaboration and the runtime mechanics of how it actually works (the encapsulation of the calls makes it appear to just happen by magic!) can be non-intuitive. It feels to me like something that could also cause external engineers to trip up and therefore should be included in basic tutorials, or at least mentioned with a reference to the relevant section on an advanced course.
https://learn.adacore.com/courses/intro-to-ada/chapters/interfacing_with_c.html#calling-ada-subprograms-in-c
The text was updated successfully, but these errors were encountered: