Comment by 813ac4312b25c
1 day ago
> Probably [hello NIGHTMARE !]. Who wants that? Nobody wants that.
I don't really care if you want that. Everyone should know that that's just the way slices work. Nothing more nothing less.
I really don't give a damn about that, i just know how slices behave, because I learned the language. That's what you should do when you are programming with it (professionally)
Yup. If you code in Go then you should know that.
Just like every PHP coder should know that the ternary operator associativity is backwards compared to every other language.
If you code in a language, then you should know what's bad about that language. That doesn't make those aspects not bad.
Note that since PHP 8.0 the ternary operator is non-associative, and attempting to nest it without explicit parenthesis produces a hard error.
The author obviously knows that too, otherwise they wouldn't have written about it. All of these issues are just how the language works, and that's the problem.
If you're fine with that then you should be upset by the subsequent example, because by your own definition "that's just not the way slices work".
I am fine with the subsequent example, too. If you read up about slices, then that's how they are defined and how they work. I am not judging, I am just using the language as it is presented to me.
For anyone interested, this article explains the fundamentals very well, imo: https://go.dev/blog/slices-intro
Then you seem to be fine with inconsistent ownership and a behavioral dependence on the underlying data rather than the structure.
You really don't see why people would point a definition that changes underneath you out as a bad definition? They're not arguing the documentation is wrong.
2 replies →
> because I learned the language
If that's your argument then there are no bad design decisions for any language.