You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Primarily, this was done to improve compatibility with Python code - it is possible to write a complete class implementation, including class fields, methods, and decorators, which is equally valid in both Python and Kuroko, with some restrictions. The way this was implemented involved parsing class bodies specially - field assignments are a unique syntax in the language and do not work like normal let declarations or even other assignment statements. In fact, in Python class bodies are normal function bodies, but in Kuroko class bodies must consist only of an optional initial docstring followed by field declarations and method definitions, possibly with decorators attached, but can not contain arbitrary statements or control flow structures.
This code won't work; can I ask why class fields must be declared without
let
?Very cool project by the way ;-)
The text was updated successfully, but these errors were encountered: