creativescala / doodle

Compositional vector graphics in Scala / Scala.JS
https://creativescala.org/doodle/
Apache License 2.0
327 stars 75 forks source link

Improve type inference #133

Closed noelwelsh closed 1 year ago

noelwelsh commented 1 year ago

The original Doodle model was that you start by fixing the Algebra operations you want to use , and then write everything to that fixed Algebra. In practice this doesn't work so well when combining different systems and we can be much more flexible. This will avoid a lot of type inference issues, particularly when writing cross-backend code, at the cost of more work for implementors of algebras (i.e. me). This is a reasonable trade-off.

The essential thing is that operations should accept some Alg and return Alg with TheStuffINeed.

noelwelsh commented 1 year ago

Closed in bb84364