4 ms·
seem like you have some Fear Uncertainty & Doubt (FUD) about this language feature. rather than cut off this feature & not use it, do you have any thoughts for
by rektide 6y ago
seem like you have some Fear Uncertainty & Doubt (FUD) about this language feature.
rather than cut off this feature & not use it, do you have any thoughts for how an ide or debugger might present some up front information about the nature of said objects? how can we reduce the risk of using the language via tooling? it'd be nice in my opinion to not retreat from the language's flexible, powerful, useful expressiveness?
- eyelidlessness 6y agoI think you’ve misunderstood my reaction. I’m certain, and I have no doubt. I’m not motivated by fear, I’m motivated by experience. These kinds of dynamic features that mimic static features are harmful to code comprehension and maintenance. Since you asked, the tooling is pretty goodish with VSCode if you use typescript, but still misleading for dependencies (getters are just treated as readonly properties, setters are indistinguishable from writeable properties).
- rektide 6y ago> I don’t want to come off too harsh I feel like your original points were kind of ok. But this attitude of superiority & certainty, this conviction that these language features are never the right answer? > I’m not motivated by fear, I’m motivated by experience. In my experience, teams & individuals can have a lot of bad sad mad anecdotes they make for themselves. But other people can find & use the same tools & techniques very stably, successfully, & to good effect. I don't fully believe you, that you have this experience. That you've earned this ability to trash & insult a rather-wide piece of JavaScript & it's use. In a complete & total way, you've said no, that you alone are the only important voice & that you have total knowledge. This isn't only harsh... it's other unfavorable things too. Meddling with descriptors is absolutely something that can go wrong, and it's very hard to know it really for sure is a good case- often you'd be better without. But there are also many good cases where these techniques & knowledge of them is absolutely divine, enables really nice solutions. If you need to instrument some existing 3rd party objects? Fantastic, absolutely fantastic.
- eyelidlessness 6y ago> superiority & certainty I apologize if my certainty came across as superiority. It wasn’t meant that way. I’m certain because of what I’ve learned, and sharing that to hopefully help others shorten that learning process. > this conviction that these language features are never the right answer? I wouldn’t say never. I can think of use cases for it, but they’re all generally around interop with external interfaces that expect this behavior. Even then the example is better served by plain value types, but there are more complex cases where I would use something like this (or a Proxy, or other dynamic dispatch techniques). > In my experience, teams & individuals can have a lot of bad sad mad anecdotes they make for themselves. But other people can find & use the same tools & techniques very stably, successfully, & to good effect. Maybe so. But if I had to guess, I would say that if those teams have a reaction to constructive critique like yours, it’s unlikely they know whether their work is effective or not. > I don't fully believe you, that you have this experience. Okay? Then don’t hire me I guess. I’m not here to prove anything, I was trying to offer a simpler solution and explain its benefits. > That you've earned this ability to trash & insult a rather-wide piece of JavaScript & it's use. In a complete & total way, you've said no, that you alone are the only important voice & that you have total knowledge. This isn't only harsh... it's other unfavorable things too. You’re wildly misinterpreting my comments. I’m not trashing anything. I’m certainly not saying I am alone in expressing anything like this. I stand on the shoulders of giants. The person who first brought the benefit of basic value types instead of dynamic behavior to my attention was a former coworker, who led me to check out Clojure, which improved my work (at least) tenfold. I’ve learned more from paying attention to ML family languages like Elm and Haskell. > Meddling with descriptors is absolutely something that can go wrong, and it's very hard to know it really for sure is a good case- often you'd be better without. But there are also many good cases where these techniques & knowledge of them is absolutely divine, enables really nice solutions. If you need to instrument some existing 3rd party objects? Fantastic, absolutely fantastic. It seems like we might not be as far off in our thinking as you assume. But I think there’s a risk in presenting something like this as a general technique rather than a special case. And I think there’s a benefit in presenting a simpler alternative that would be better for 99% of cases.
- rektide 6y ago