3 ms·
I suppose the more poetic: "don't speak too soon, for the wheel's still in spin" is another way to state it. It isn't "new things might be good" it is more a re
by zoogeny 2y ago
I suppose the more poetic: "don't speak too soon, for the wheel's still in spin" is another way to state it. It isn't "new things might be good" it is more a reminder that your self-described feeling of unease may say more about you than it does about the language feature under question.
I've seen some horrors in my time due to custom operators. I've also suffered through some horrors when they are missing and would clearly be appropriate. They seem appropriate for linear algebra libraries for example. Not everyone agrees, obviously.
As an aside, I have been watching a lot of YouTube videos of people programming C. I notice that goto shows up very frequently, especially in modern C. Usually it is a label at the end of a function to manage resource cleanup before returning, almost like a manual `defer`. Sometimes it is to break out of nested loops. I mean, I've always taken Dijkstra's point to be that long jumping out of a procedural boundary was the real problem, not the keyword "goto". And built-in language features that obviate the need to use goto even for the reasonable use cases are my preference.
I feel the same about custom infix operators. I too share an unease about them. But I have to admit they feel right sometimes. I admit I don't have enough information on their use in this kind of case to know if it is one of the good ones or one of the bad ones.