Enumerations

Prevent Breaking Code Changes in Future Releases using `non exhaustive` enums in Rust

Reading Time: 2 minutes Hello everyone, recently I have come across a feature in Rust, known as non_exhaustive. It was introduced in Rust 1.40.0 . This attribute prevents source code-breaking changes in projects downstream. enums can be non-exhaustive or exhaustive, depending upon their needs. A non-exhaustive enum indicates that this enum may get new value in the future. By adding #[non_exhaustive] attribute, we can create a non-exhaustive enum which Continue Reading

Understanding Java enums

Understanding Java enums

Reading Time: 8 minutes Hello all, in this blog post we will study one of the strongest features of the Java language, enum’s. A good understanding of Java enum can make your program stand out of the crowd, and we will see how. We’ll establish a good understanding of the feature, learn how Java enum are different from other languages. Also, we will see the scenarios where we can Continue Reading