Enumeratum
Stateless Future
Enumeratum | Stateless Future | |
---|---|---|
4 | - | |
1,177 | 177 | |
- | 0.0% | |
5.7 | 0.0 | |
about 1 month ago | about 7 years ago | |
Scala | Scala | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Enumeratum
-
How to implement `if-else if -else if -else` with cat effect IO in Scala?
I'm not sure I understand what Cats or cats-effect has to do with what you're trying to do. As far as I can tell, it sounds like what you're asking is simply "what's the best way to implement an enumerated type in Scala?" The best answer to that I'm aware of is Enumeratum.
-
Concise enumeration in Scala
In Scala 2: enumeratum which is, essentially, option 3 from your post.
-
Simple, Naïve, and Wrong: More than you wanted to know about Scala Case Classes
And for exactly the same reasons one shouldn't override equals and hashCode in a case class, they shouldn't manually implement an enumeration and instead let a well-tested macro (2.x) or the compiler itself (3.x) handle reliably doing the automated code generation. The more code that is generated by the compiler, the smaller the defects, technical debt, and security vulnerability surface areas.
-
A survey of programming language enum support
For Scala, check out the enumeratum library (https://github.com/lloydmeta/enumeratum). In my opinion its the best enum implementation I know of. It has all the features defined in the table, and the syntax is really clean. It even supports unique associated values (eg. unique String/Int keys).
Stateless Future
We haven't tracked posts mentioning Stateless Future yet.
Tracking mentions began in Dec 2020.
What are some alternatives?
Chimney - Scala library for boilerplate-free, type-safe data transformations
Scala Graph - Graph for Scala is intended to provide basic graph functionality seamlessly fitting into the Scala Collection Library. Like the well known members of scala.collection, Graph for Scala is an in-memory graph library aiming at editing and traversing graphs, finding cycles etc. in a user-friendly way.
Scala Async - An asynchronous programming facility for Scala
Twitter Util - Wonderful reusable code from Twitter
Shapeless - Generic programming for Scala
Scala Blitz - Scala framework for efficient sequential and data-parallel collections -
Each - A macro library that converts native imperative syntax to scalaz's monadic expressions
refined - Refinement types for Scala
Scalaz - Principled Functional Programming in Scala
n-scala - A new Scala wrapper for Joda Time based on scala-time
cats - Lightweight, modular, and extensible library for functional programming.
ScalaTest - A testing tool for Scala and Java developers