We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I keep seeing a need for some way to cast one type to another.
You can see this in 3 places in current Microstates: Type -> TypeTree, TypeTree -> Transitions, TypeTree -> States.
I'm currently doing this with a static method, but when a TypeClass is created the static method becomes inaccessible.
Something funcadelic might look like this,
import { cast } from 'funcadelic'; let transitions = cast(tree, Transitions);
Internally, it might look something like this:
export const Castable = type(class Castable {}); function cast(t, Type) { return Castable(Type).cast(t); }
Castable(Type).cast needs to match t to many potential targets. We don't have a pattern for matching many types to many types of data.
Castable(Type).cast
t
What's the funcadelic way of doing this?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I keep seeing a need for some way to cast one type to another.
You can see this in 3 places in current Microstates: Type -> TypeTree, TypeTree -> Transitions, TypeTree -> States.
I'm currently doing this with a static method, but when a TypeClass is created the static method becomes inaccessible.
Something funcadelic might look like this,
Internally, it might look something like this:
Castable(Type).cast
needs to matcht
to many potential targets. We don't have a pattern for matching many types to many types of data.What's the funcadelic way of doing this?
The text was updated successfully, but these errors were encountered: