Michael-F-Bryan / arcs

A Rust CAD System
https://michael-f-bryan.github.io/arcs
Apache License 2.0
253 stars 22 forks source link

Started writing infrastructure for modes #14

Closed Michael-F-Bryan closed 4 years ago

Michael-F-Bryan commented 4 years ago

This is the infrastructure part of #9.

(see Michael-F-Bryan/adventures.michaelfbryan.com#11 for the logic)

Michael-F-Bryan commented 4 years ago

@DerLando, would you be able to have a quick look over this and let me know what you think?

DerLando commented 4 years ago

I had a quick look over this and like the idea!

From my understanding it will be possible to compose a Mode from multiple structs which implement State? That seems close to the spirit of the crate of composition over inheritance.

I don't see any technical pitfalls for now but I'm also not too experienced in rust.