3 ms·
JS objects are dynamic with the ability to add/remove class properties and methods or to dynamically change what class/object it inherits from all as the progra
by CyberDildonics 4y ago
JS objects are dynamic with the ability to add/remove class properties and methods or to dynamically change what class/object it inherits from all as the program executes.
You realize they're just hash maps / dictionaries right?
Most C++ programmers started programming C++ long before JS became popular.
Do you think most C++ programmers today started 30 years ago in the early 90s?
You realize you can write everything you wrote pretty directly in C++, python, lua or a lot of other modern languages out there right? I get the impression that you don't know much about modern C++ and just base what you are saying off things you have heard from other javascript programmers trying to avoid learning other languages.
- hajile 4y ago> You realize they're just hash maps / dictionaries right? That's only a conceptual idea. In reality, the JIT uses real arrays and dynamically generated structs. You can't actually implement them directly as conceptually described anyway. You have to have a has of boxed pointers and when you get around to adding functions with types, things get really weird. The class implementation is actually much more simple in many ways (not to mention being much faster). > You realize you can write everything you wrote pretty directly in C++ I know you can't write curried functions "pretty directly" in C++ (Python and Lua are the languages I was discussing directly and both are far better for UI work than C++). Give it a try and post the results. I'd be very impressed if it took even just twice as many lines of typical C++ code.
- CyberDildonics 4y agoI don't even know what point you're trying to make anymore. You originally said you think C++ takes five times as long as javascript and that most C++ programmers learned it before javascript existed. Have you ever used modern C++?