dio
Dio - Dive Into Objects - Ruby Pattern Matching interface for Objects which have none (yet) (by baweaver)
matchable
Pattern Matching interfaces in Ruby made easy (by baweaver)
dio | matchable | |
---|---|---|
3 | 3 | |
24 | 7 | |
- | - | |
3.6 | 0.0 | |
over 3 years ago | over 3 years ago | |
Ruby | Ruby | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.
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.
dio
Posts with mentions or reviews of dio.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-23.
-
Pattern Matching Interfaces in Ruby
Pattern matching interfaces can be simulated using gems such as Dio for testing purposes. It does not act as a replacement, but rather a stand-in to test interfaces without full implementations.
-
Exclude elements from a Ruby hash based on contents of nested hash?
Pattern matching is very powerful, but unfortunately it's very picky about String versus Symbol keys in these cases which is annoying. I made Dio as a quick hack around this, but it's more for experimenting and feeling out an interface than prod usage: https://github.com/baweaver/dio
- Dio - Dive Into Object - Pattern Matching Interface Wrapper for non-PM Objects
matchable
Posts with mentions or reviews of matchable.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-23.
-
Pattern Matching Interfaces in Ruby
In the case of most applications the performance implication of using public_send should not be enough to cause concern, but there are tricks to dynamically compile against this using eval in case performance becomes an issue.
-
Definitive Pattern Matching - Array-like Structures
This can be more easily achieved using Matchable, like so:
-
Matchable - Class-level Pattern Matching Macros Explained
Recently I've released a new gem, Matchable, which introduces class-level macro methods for Pattern Matching interfaces:
What are some alternatives?
When comparing dio and matchable you can also consider the following projects:
deconstructable
ast - A library for working with Abstract Syntax Trees.