5 ms·
(How to Write a (Lisp) Interpreter (In Python))
- timonoko 5y agoI betterfied it just a little bit: https://github.com/timonoko/nokolis.py https://github.com/timonoko/nokolis.py
- timonoko 5y ago(1 . 2)?
- iamevn 5y agoI've got a nitpick that x.val() in Java is not accurately represented as (val x) in a scheme. there's a few different ways schemes do objects but two common ones are to either: Treat x as callable and call it with a symbol representing a member method: (x 'val) Or have a macro that takes the object and method name as arguments, for example: (send x val) I've also seen schemes that have class definitions introduce functions for each method/property so if x is an instance of SomeClass: (SomeClass-val x)