Meanwhile I just enjoy developing in it every day. Other than having to maintain the odd ExtJS app, it's simply the best. cue triumphant sax
Meanwhile I just enjoy developing in it every day. Other than having to maintain the odd ExtJS app, it's simply the best. cue triumphant sax
The first step would be to understand the difference between weak/strong and dynamic/static typing.
https://github.com/js-cookie/js-cookie/blob/master/src/js.co...
I'm sure js could be nice, but it never seems to be.
What you're looking at is a relatively poor example. In es6, that could be ...
exports default function...
without all the cruft around it, also the module itself could be cleaner. Similar to: var cookies = parse();
export function set({key, value, days=null}) {
...
}
export function get(key) {
...
}
export const remove = (key) => set({key, value:null});
export function parse(values = document && document.cookie || '') {
...
}Firstly, that's a strawman. I prefer strongly-typed dynamic languages and I still think JavaScript sucks.
Secondly, I think you're confusing strong vs. weak with dynamic vs. static. JavaScript's weak typing is unequivocally one of the worst things about the language.
I think you contradict this in the rest of your comment:
>Javascript is poorly designed because there are these rules you need to learn and because there are some language features that you just don't use.
One rule you've mentioned:
>using === over ==
Which is a result of weak typing. So maybe weak typing is a language feature "that you just don't use"? Which, according to you, makes weak typing a reason why JavaScript is poorly designed.
But your claim wasn't "weak typing was a bad design decision", it was "JavaScript's weak typing is unequivocally one of the worst things about the language". I think it's silly to call a mis-feature "unequivocally one of the worst things" when people who write javascript basically never run into, and when it can be completely avoided by using unintrusive tooling like a linter.
oh, and Visual Basic!!!
I didn't say JavaScript is all anyone needs for every situation, just that it's great imo.