![]() |
![]() |
|
This Java implementation, E0.java, uses the same classes as E0-java/, except that it puts all the code for (say) eval into a single method, rather than spreading it across multiple classes/files. The actual-work is equivalent, but being able to stay in one file rather than separate files for 4-7 variants of Expr makes it a bit more convenient. It does this by using some more recent Java features (sealed classes, and pattern-matching-with-records), which make the result even closer to the corresponding racket E0 implementation.
You may choose to use either this E0-java-sealed/ or the “traditional” E0-java/ implementations. So, you ask, which should you choose as your starting point? I invite you to look at the body of eval in , and if you think you can use that example to extend it in a similar way, then go for it!
You can invoke the JUnit tests by:
This page licensed CC-BY 4.0 Ian Barland Page last generated | Please mail any suggestions (incl. typos, broken links) to ibarland ![]() |