How’s it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK 🇬🇧
Education
11 plus years* active enterprise development experience and a Fine art degree 🎨
I write SQL this way - in a SQL editor (like SQL Tools) and in my code (mostly Visual Studio). You can comment out individual items from your select and not break anything if you structure it right.
I didn't read the post so if that's what he said then I completely agree :-)
I do similar for ternary and logic operators. It has all the benefits of the above, plus you can comment out the line without having to faff about with commenting the '&&' or '||' at the end of the previous line.
A software developer. I'm interested in learning new technologies and core language features. I love to dive into legacy code writing tests and refactoring as I go.
A software developer. I'm interested in learning new technologies and core language features. I love to dive into legacy code writing tests and refactoring as I go.
A software developer. I'm interested in learning new technologies and core language features. I love to dive into legacy code writing tests and refactoring as I go.
But that depends on the style of the language or developers involved. When having the bracket on a separate line is expected, "reverse the problem" seems correct to me.
I wonder the probability of encountering such a merge conflict versus the amount of code you will write (and read) in a not-so-human-readable way. The complexity introduced doesn't justify its use case.
I understand why people are looking at leading commas, but they're a hack to get things to work better with VCS. And you know what? That shouldn't impact how you use the language.
How’s it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK 🇬🇧
Education
11 plus years* active enterprise development experience and a Fine art degree 🎨
Print designer turned web designer, turned educator, turned front end developer, turn full stack dev.
I've worn a lot of hats. I can fit more on the stack.
I hadn't encountered comma first until recently in some old code. Drove me crazy and I couldn't figure out why someone would do that. This explanation makes a lot of sense.
Addicted to building tools that don't exist yet... making my (and hopefully someone else's) life easier!
I build serverless web-apps, IT admin scripts, and I even do some VO work!
Admit it, you just wanted to make people mad
I read it, I saw maybe a thin benefit. But I just can't do it. It make me want to cry.
My god this actually convinced me
I write SQL this way - in a SQL editor (like SQL Tools) and in my code (mostly Visual Studio). You can comment out individual items from your select and not break anything if you structure it right.
I didn't read the post so if that's what he said then I completely agree :-)
I refuse to do this. Even though I really should
I do similar for ternary and logic operators. It has all the benefits of the above, plus you can comment out the line without having to faff about with commenting the '&&' or '||' at the end of the previous line.
The git argument seems correct but doesn't it just reverse the problem? Wouldn't adding a value to the top of the list have all the same problems?
adding to the top will create a [+2, -1] diff in both styles. you'll need to keep the opening bracket on its own line to avoid that.
So yes?
uh, yes, but 'reverse the problem' is incorrect since it exists for both
But that depends on the style of the language or developers involved. When having the bracket on a separate line is expected, "reverse the problem" seems correct to me.
separating the bracket will fix the problem for both styles.
logically speaking, there’s no ‘reversal’ no matter how you peg it, as you’re coupling the data with its dependent comma instead of separating them
I wonder the probability of encountering such a merge conflict versus the amount of code you will write (and read) in a not-so-human-readable way. The complexity introduced doesn't justify its use case.
This is genius!
In Elm this is the norm ❤️
I understand why people are looking at leading commas, but they're a hack to get things to work better with VCS. And you know what? That shouldn't impact how you use the language.
Indeed, just resolve the conflict and move on.
Thought it was a creepy trolls, but it's arguably logic.
Nice one, I'll go into it
I hadn't encountered comma first until recently in some old code. Drove me crazy and I couldn't figure out why someone would do that. This explanation makes a lot of sense.
No way the code look awful
no way to get this in an eslint/prettier config to apply automatically?
Write a shopping list in this style and give it to someone more ordinary than Haskell programmers... You will be surprised.
It's just disgusting.