-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
16f OOP: Frames #40
16f OOP: Frames #40
Conversation
Yep, we are trying to eliminate all uses of the helper functions for frames; we have replaced them with frame methods. Since the frame methods don't do type-checking, we still have to keep the error methods, and use them where appropriate. Still, that means we've managed to replace two sets of helper functions (in the resolver and interpreter) with one set of methods (in Frame). Overall, it's still a win for maintainability. |
A couple quick bugfixes: [03b2ba5] And a nice And we have a working Frame object 🖼️ |
Finally, we're down to the last dict ripe for conversion: the
frame
.There's nothing wrong with a dict for a frame; what's going on is I'm tired of repeating helper functions for dealing with frames. These helper functions work primarily with frames and names, and it makes good sense to bundle them together so that we can use those functions wherever the frame goes.
Let's start with a Frame class:
https://github.com/nyjc-computing/pseudo/blob/c1ffed90f1bd74b3e3104c97d247b46cb5eca421/lang.py#L86-L133