5 ms·
The more ways there are to write in a language, the harder it gets to read the code of someone else using a different style guide, or with different preferences
by handrous 5y ago
The more ways there are to write in a language, the harder it gets to read the code of someone else using a different style guide, or with different preferences, than you. This matters a whole lot in a language so completely dependent on 3rd party libraries as JS is.
Not that I think this will hurt much, as the language and community fled that barn long ago. There are already 50 ways to do most things in JS, half of which will be present in your deps, and only 5 of which a typical active JS developer will happen to have stored in their brain at any given time.
- ledauphin 5y agoThis is certainly true. But this is also true of human languages, very few of which 'stop development' at the level of complexity of even the most complex programming language. I love a good lisp or ML, and all things being equal, less syntax is probably better than more. But flexibility is also a good thing, and the irony is that the proof is almost always in the pudding - if a language gets too complex (e.g. Perl, C++), it is almost always true that the community eventually establishes solid guidelines around which idioms to avoid (or when to avoid them). Sometimes there's pain, but rarely do languages die because of it. I think it's possible to have a reasonable debate about when to introduce new language features, but around here, in my opinion, the pendulum has swung very far toward the "don't move my cheese" side of things.
- crate_barre 5y agoWhat do you want from this community? All we hear, day and night, is how JavaScript sucks and has gotten ridiculously complicated. Now someone shows up with a proposal for pipes or the F# people and their pipes, like, what do you want from us? We’re aware of what’s happening, or has happened to JS, and we’re having the realistic discussion about this stuff finally. The once ‘oh neat, new JS thing, let’s use it’ phase is over. We’ve seen the concrete impact of too much shit layered on top of each other in actual workplace codebases. If you wanted this, you shoulda came earlier, the party is finished. We went too far between 2010-2020 and we’re all exhausted. It’s got nothing to do with ‘don’t move my cheese’ and everything to do with ‘I think we’re good over here, thx’. We need to take a step back, evaluate all the nonsense (clean up after the party), before we can throw another one. Like, it’s all good F# pipe people, totally appreciate your input, but we have our own clusterfuck that needs to be sorted out at the moment, maybe next time.
- handrous 5y agoProgramming languages are tools. I don't like it when I find out I'm going to need yet another set of bits for some new type of screw head, either. Doubly so if it's at-best marginally better than the two next-best kinds I already own. Takes up space, more shit to misplace or mistake for something else, et c.
- ModernMech 5y ago> This is certainly true. But this is also true of human languages Yes, but this goes to the parent's point. Natural languages dialects can be so distinct that even though two interlocutors may be speaking the same language (e.g. English), they still might not be able to understand one another. Classic example: https://www.youtube.com/watch?v=73d6h_go7QI https://www.youtube.com/watch?v=73d6h_go7QI This happens in computer programming languages as well. If you're a C++ programmer who uses smart pointers for everything, then you will have a rough time with my C++ code that uses raw pointers for everything. Even though we would both call ourselves C++ developers, our code follows different idioms, they are essentially different "dialects" of C++. I put dialect in quotes, because I wonder if there is any effort to track, catalogue, or otherwise create a taxonomy of computer programming language dialects as is done for natural language dialects. Like, you can figure out where someone was born based on the words they use. Can you figure out what kind of projects a person has worked on, the companies they worked for, or the school they went to based on the style of code they write? This would be the job of a linguist or sociologist I think, and I don't know how often they look toward or communities for study.
- de_keyboard 5y ago> The more ways there are to write in a language, the harder it gets to read the code of someone else using a different style guide, or with different preferences, than you. This matters a whole lot in a language so completely dependent on 3rd party libraries as JS is. Hmmm, kinda. The pipe operator enables more readable code, so whilst I agree there would be more ways to do things, the average code readability could well go up.
- hungryforcodes 5y agoThis is what they said about fat arrow functions and that's only true in some cases.
- BigJono 5y agoThe average absolutely won't. The average dev misuses new language features. Every time one of these things is introduced, 90th percentile code gets cleaner and 50th percentile code gets worse.