4 ms·
Great write up, and neat ideas. One of my biggest hurdles on learning Javascript so far is that because definitions are so flexible, its very difficult to pick
by dexwiz 11y ago
Great write up, and neat ideas. One of my biggest hurdles on learning Javascript so far is that because definitions are so flexible, its very difficult to pick up a code base with an unfamiliar structure. Mixins in particular spread code between files, and the mixin itself is often hidden, or not obvious. At least in Java, I know I can look at extends, and trace it from there.
The decorator pattern seems like it would be pretty obvious. But its yet another non standard way to create objects. If I saw without explanation, I would be at a loss on how it works, or even what it does. At least method overriding is consistent when it is baked into a language. But having to learn a new mixin/inheritance/definition pattern for each codebase has given me serious troubles recently.
- braythwayt 11y ago> At least method overriding is consistent when it is baked into a language Right there you have one of the two great families of programming. You like things like Python, where there is only one obvious way to do anything, and if it isn’t obvious, you just don’t do it. These ideas are from the other family, where you have a number of small but powerful ideas that you can combine in various ways. The ones that solve problems and have great timing and get some marketing oomph establish community traction, the rest fade away. This is the UNIX and Lisp tradition. I can’t tell you whether one is better than the other. I can tell you that the first thing is IBM. And opinionated frameworks. And benevolent dictators. The second thing is startups. And libraries. And tinkerers. There’s no shame in preferring one to the other. Both have produced great things.
- dexwiz 11y agoI look forward to the day when the rest fades away from Javascript. Right now it is the wild west in terms of pattern usage, especially when it comes to implementing "private" variables with some scope tricks that result in unreadable code.
- deleted 11y ago[deleted]