Hacker News new | past | comments | ask | show | jobs | submit login

Similarly, probably the main reason I really like JS... I can apply different paradigms to different areas of code where a given approach makes more sense in terms of understanding or cognitive overhead. JS debugging is relatively nice as well, though in some cases the tooling leaves a bit to be desired.

When I'm in C# by contrast, I often get irritated that I can't just have a couple functions that I can reuse, no, I have to create as static class, ideally in a namespace and do a bit more. I do try to minimize the complexity of my classes and separate operational classes that work on data, and data classes that hold values.




separate operational classes that work on data, and data classes that hold values

This is how I view Entity Component System. It's kind of re-mapped Object Oriented, with strict Areas of Concern.


I wish we named all kinds of ECS-es. It's a total confusion of terms now. Your view is one kind of ECS. Another view is "structuring data to be cache-friendly". Another is "data feels better when modeled and accessed in relational fashion". Yet another is "composition over inheritance taken up to 11". People mix and match these views, which is why every single article on ECS seems to be talking about something different from every other article.


Your view is one kind of ECS. Another view is "structuring data to be cache-friendly". Another is "data feels better when modeled and accessed in relational fashion". Yet another is "composition over inheritance taken up to 11".

You can do all 4 of those at the same time!


I believe you can, though I've not been there myself. But all the articles I've read and all the ECS implementations I've studied so far usually focus on one, maybe two of those aspects at a time, so every one looks different from another.

(In my current side project, I have relaxed performance requirements, so I'm experimenting with taking the relational aspect up to 11.)


Maybe I'm not so sure what you mean by "taking the relational aspect up to 11." My side project is in golang, so composition over inheritance isn't really an issue. I guess that leaves me with just 2 of the aspects.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: