![]() ![]() A clear translation win is leveraging Swift’s protocols and extensions to accommodate the same kind of setup. The author tackles some of the awkwardness of that by aggressively using a visitor pattern over Java classes. Replacing the Visitor Pattern with Protocols and ExtensionsĪ lot of the example code takes advantage of classes and uses a fair number recursive calls. I thought I’d write about what’s worked, and where I think I might have painted myself into a corner. This is not something I’m very familiar with, so I’m trying a couple different ways of tackling the development. While going through it, I’m making a stab at translating the example code in the book (which is in Java) into Swift. It is assumed that delegates will have several years experience in Swift / iOS and be familiar with the core concepts of object-oriented and functional programming.I’m working through the online book Crafting Interpreters, (which I highly recommend, if you’re curious about how such things are built).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |