DelSkayn / rquickjs

High level bindings to the quickjs javascript engine
MIT License
504 stars 63 forks source link

Improve class ergonomics. #145

Closed DelSkayn closed 1 year ago

DelSkayn commented 1 year ago

A Class initially allowed mutable access to it's definition, but this turned out to be unsound #83.

We removed mutable access in #90 and, as a result, trying to implement a method for a class definition which takes self mutably will now result in a compile error.

This is rather cumbersome as code often needs some form of mutable access to the members of a class definition and this requires users to, currently, wrap any field they want to mutate in some kind of Cell.

We should implement some method of automatically wrapping class definitions in a Cell to make class definitions easier to use.

DelSkayn commented 1 year ago

Implemented in the new 0.4.0 release