The June 2013 Open Ada-DK Meeting
By Thomas Løcke | Published: June 2, 2013
June 4th 2013 from 1730 -> 2300 marks the day for the next open Ada-DK meeting.
The “open” part means that the meeting is not a members-only affair, but that anybody interested in Ada is welcome, so feel free to invite whomever you might believe could be interested in spending an evening talking about Ada programming.
Posted in Ada-DK Meetings | Leave a comment
Su(per)btypes in Ada 2012 – Part 1
By Thomas Løcke | Published: April 25, 2013
If you want to learn a bit about types and the Static_Predicate aspect in Ada 2012, then this AdaCore gem has the good stuff:
Ada 2012 is full of features for specifying a rich set of type properties. In this series of three Gems, we describe three aspects that can be used to state invariant properties of types and subtypes. This first Gem is concerned with the Static_Predicate aspect.
With the Static_Predicate aspect you can do cool stuff like this:
type Day is (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday);
type T_Day is new Day with Static_Predicate => T_Day in Tuesday | Thursday; |
Nice eh’? The compiler will now protect you against assigning Friday to a T_Day. That is pretty neat. Stay tuned for part 2 and 3, where more of the Ada 2012 goodness will be explained.
Posted in Uncategorized | Leave a comment
AdaDoom3 – FPS Action in Ada
By Thomas Løcke | Published: April 16, 2013
Those of us who are gamers at heart, know that Id Software usually release their “old” games and tech as open source, and naturally that also happened for the Doom 3 game. This in itself is good news, but what is even better is the fact that efforts are being put into an Ada port. The man behind the project is only known to me as J JS, and he is hosting the project at the AdaDoom3 GitHub repository.
A few posts has been made about the project at the Ada Programming Community:
- Initial news item about AdaDoom3, by Thomas Løcke
- State of AdaDoom3, by Adam Wolk
Feel free to pop in and join the Doom fun!
Posted in Ada Programming | Tagged AdaDoom3 | Leave a comment
Dr. Dobbs Got The Lowdown on Ada 2012 Contracts
By Thomas Løcke | Published: April 14, 2013
In an article aptly named Ada 2012: Ada With Contracts we get a very nice presentation of the new Ada 2012 facilities for contract-based programming.
The most recent version of the Ada standard, known as Ada 2012, brings contract-based programming to a mainstream language. Preconditions, postconditions, type invariants, and subtype predicates allow software developers to specify their programs’ intent more clearly, in effect embedding requirements into the source code. This feature makes it easier to review and understand the program, and it facilitates verification by the compiler, static analysis tools, and/or runtime checks.
I’ve used these new-fangled shinys a bit, and they are nice. Very nice actually. There’s just something truly awesome about being able to add pre/post-conditions to your method specification. The extra level of information and protection against errors is pretty amazing, and it is so darn easy to work with.
If you haven’t already tried your hand at these new features, be sure to do so. As the article says at the very end:
…the techniques of contract-based programming represent a significant advance.
I wholeheartedly agree.