Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I haven’t used lisp is 30 years, so help me understand/remember why this would be easier than say C++ or any other language with object inheritance and virtual functions. Is there something else about it?


OO is absolutely the wrong paradigm for interactive fiction. Writing a text adventure has been my favorite way to experiment with a new language for decades now, and I’ve gone down the OO rabbit hole too many times. For this use case, you want something more like an ECS, so that a single entity can be more than one kind of thing at the same time. Consider a talking robotic vehicle. It is an object in the world: the player can interact with it from the outside. It is a room, with contents: the player can be inside it. It is an NPC: the player can speak with it. Trying to accommodate that in an OO inheritance hierarchy has always tied my code—and brain—in knots. An ECS-like architecture can handle it easily.


Thanks - I hadn’t heard of ECS before. That expanded my mind :)


That was my reaction when I first came across it.




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

Search: