Hacker News new | past | comments | ask | show | jobs | submit login
Crafting Interpreters: Classes and Instances (craftinginterpreters.com)
224 points by azhenley 6 months ago | hide | past | favorite | 13 comments



I highly recommend Piumarta: https://www.piumarta.com/software/cola/objmodel2.pdf

A minimal, open-ended, end user programmable object runtime model. This paper really changed how I think about classes and objects and their implementation.


I've been following this book and I really enjoy it. The style is in a sweet spot for me between "here's all of the code, just read it" and "here's some theory, go do it yourself"


An implementation of classes with prototypes:

http://journal.stuffwithstuff.com/2010/08/01/class-in-the-fr...


> This is the best of both worlds: prototypes are easier for the language implementer to code and classes are easier for the user to use.

Of course you also get the worst of both worlds: the performances of prototypes and the split world of classes.


Can you explain how this is so much different in terms of performance? Since users doesn't have direct access to the prototypes, they're not doing arbitrary manipulation or creating long chains of them.


Also true!


Note for completeness, that blog is by the author of this book.


Why is this dated 2017? This chapter just came out.


ikr... tbf this book has been going on forever now :) can't blame the author though.


Looks like just two chapters left though.

I've been putting off reading it until it comes out so I'm glad I see the update progress here.


Moderator mistake. Not sure why. Fixed now. Thanks!


The book has two parts, both of which can reasonably contain a chapter of that name.


This happened with the last chapter too. I’m not sure who changed it...




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: