Re:Ada's Dependent Types, and Its Types as a Whole
by LiamPowell on Saturday December 28, 2024 @03:42AM
(#42529543)
You can specify endianness, but only over the entire record, not an individual field. The way it works is a little complicated: https://www.adacore.com/gems/gem-140-bridging-the-endianness...
[ Parent
| on HN ]
Re:Ada's Dependent Types, and Its Types as a Whole
by quietbritishjim on Saturday December 28, 2024 @06:54AM
(#42530384)
Interesting, thank you. I think per-record is probably good enough for most applications, and less verbose than per-member. But it's not part of the language (that page calls it "implementation specific") and quite recent (that page is undated but references Ada 2012 so must be since then). It wouldn't have helped the Ada project I'm working on, which had an endianess crisis with serialisation a few decades ago.
Re:Ada's Dependent Types, and Its Types as a Whole
by Jtsummers on Saturday December 28, 2024 @10:31AM
(#42531723)