Does JavaScript have some special definitions for delegation and dynamic dispatch ? The definitions provided in the article appear to particularly relate them to inheritance - which is not the traditional definition applied to either term in object-orientation?
JavaScript. The Core: 2nd Edition
91–96 of 96 posts
Re: JavaScript. The Core: 2nd Edition
#92Earlier quoted context omitted.
You've got me thinking now. Can you/anyone give me 3 solid cases where the flaw was in javascript and not the programmers understanding of the language ? I can't. (Not at the moment at least). Most of the times I got things wrong it was my understanding of how js works that was at fault.
Of course the flaw is always in the programmer's understanding. Langauges do not manipulate or lie to you, they are what they are. However, better tools and languages reduce your cognitive burden. The less mental context you have to work with the more you can focus on the problem at hand. If you have to constantly worry about language edge cases and odd behavior, it really detracts from being able to focus on the pro…
Depends really on how much care was put into the application structure, mostly from the outset.
I've followed opinionated styleguides closely on some projects, and have also walked into other swamp projects that snowballed into something massive from a few snippets of jQuery. The difference between working on something that was intended to be maintainable from the start and something that evolved haphazardly is of course like night and day.
I still think it's more the people and approach than the tools.
Re: JavaScript. The Core: 2nd Edition
#93Earlier quoted context omitted.
> why nobody has created a version of JavaScript that just throws exceptions for all the WTF cases? Google experimented with something they called "strong mode". Classes were read-only, accessing nonexistent properties was an error, and things like that. I liked it. Unfortunately, the experiment didn't go anywhere and strong mode was removed from Chrome. Dart is somewhat similar, though. It got more straightforward s…
Dart has strong mode.
Re: JavaScript. The Core: 2nd Edition
#94Earlier quoted context omitted.
It's jealousy. Most languages had major design flaws. Rubyists will gladly complain about how OO is bolted on in Python, Python users will gladly talk about how slow Ruby's interpreter was and how god awfully complex the syntax is. Both of them have limitations in their runtimes and are actually catching up to JS in some areas (see Python's adoption of async). We can talk about how baroque CL is or how much Java suck…
JavaScript and PHP are badly/barely designed languages, period; no amount of excuses and comparisons is going to change the fact. Anyone with a bit of experience in either Ruby or Python will tear their hair out when doing JS, because they know it doesn't have to be that difficult. These days it's looking more and more like C++ every day...
In Ruby code starts executing before everything is initialized making it unpredictable. Also JS is just so much smoother is composable. It's far superior to RUBY IMO
Re: JavaScript. The Core: 2nd Edition
#95Earlier quoted context omitted.
>I fail to get the flak that javascript faces ! I personally don't like that Javascript has had to have a ton of work done on it to get it to the point of other languages that were better at their first release. It was just a ton of time spent on something that was weak to begin with. If Javascript were better at the beginning, and this same effort was spent on it, it probably would be ruling the world, front and bac…
"it probably would be ruling the world, front and back-end" So, what would be different about that? JavaScript does rule the world, front (definitely) and back-end (arguably, but there aren't a lot of contenders for the language that's more popular for new projects).
Re: JavaScript. The Core: 2nd Edition
#96Earlier quoted context omitted.
"it probably would be ruling the world, front and back-end" So, what would be different about that? JavaScript does rule the world, front (definitely) and back-end (arguably, but there aren't a lot of contenders for the language that's more popular for new projects).
JS is nowhere near "ruling" the backend. That's just ridiculous.