fix(report): mention reverse operators limitation
This commit is contained in:
@@ -20,6 +20,8 @@ A non-exhaustive list of such opportunities and ideas has been compiled and orga
|
||||
|
||||
There are a few known limitations and unwanted behaviors in the current version of Midas. The first, which has already been discussed in @sec:gen-assertions, concerns `cast` inside logical expressions. Due to the way assertions are generated, as `assert` statements before the cast expression, the interpreter will eagerly evaluate them even if there value will be short-circuited by a logical operator. Another issue addressed in that section is the lack of runtime type checking of object members (properties and methods).
|
||||
|
||||
The way method resolution is implemented also makes the behavior of operators slightly differ from what the interpreter will do at runtime. For example, reverse operators (e.g. `__radd__`) are not looked up by Midas. This makes some operations invalid for Midas, such as `1 + 1.0`, while `1.0 + 1` is correctly type checked.
|
||||
|
||||
In @sec:python-call-generic, we mentioned a `Unifier` class to help finding appropriate substitutions for type parameters of a generic function call. There is one case that is not yet handled however. This case concerns generic function calls with generic arguments. Chapter 22 of #acr("TaPL")@tapl on _Type Reconstruction_ provides some good leads to making `Unifier` more robust and complete.
|
||||
|
||||
One last important issue with Midas as it is, which would require some work to fix, is the absence of a mechanism to handle references. Currently, the type checker expects that variable declared with a given type will remain structurally unchanged in the program's lifecycle. Unfortunately, this is simply not true with objects such as dataframes, which can have their schema modified somewhere, affecting other unrelated references. Some good first leads can be found in Chapter 13 of #acr("TaPL")@tapl on _References_.
|
||||
|
||||
Reference in New Issue
Block a user