A tutorial on how to use Java's new Record Patterns feature to write powerful, concise pattern matching code for usecases like AST transformations and rewrite-rules in compiler passes.
A dual-purpose tutorial to 1) Demonstrate how to implement the Simple Query Protocol, where Java is an implementation detail; 2) Show practical examples of most of the new features since JDK 17, including Records, Sealed Types, Pattern Matching for Switch, Virtual Threads, and Panama Foreign-Function & Memory API.
Design-by-Contract's invariant attribute allows you to enforce important properties of systems and data structures, making it an incredibly useful tool for developers. In this blog post, we'll be exploring the development of a GCC plugin that adds support for [[invariant]] conditions in C++ classes and structs. We'll also be looking at an example of how invariant can be used to improve the integrity of a Stack data structure. This is especially timely as GCC has recently added support for Contracts, allowing you to annotate functions with pre/post conditions. Don't miss out on learning how to use this powerful feature in your own projects!