3 ms·
They're functions. Whatever they do, my code will go execute some code from whatever library implements them, which is what a function does. I just want to be a
by coldpie 3y ago
They're functions. Whatever they do, my code will go execute some code from whatever library implements them, which is what a function does. I just want to be able to rely on [] being an array subscript when I read some unfamiliar code. Is that too much to ask?
- pjmlp 3y agoJust like the function that happens to be named [].
- kristiandupont 3y agoCan IDE's detect this and offer "go to implementation" on an overloaded operator these days? Because besides from the surprise-element in the fact that there even is code to debug hiding somewhere, not being able to quickly navigate to it is much worse in my opinion. And with infix operators where you can't even be sure which operand the implementation belongs to, figuring it out can be a bit of a detective task.
- pjmlp 3y agoVisual Studio does show a popup, go to implementation, and if the implementation happens to be visible on the same screen, also highlights it.
- circuit10 3y agoIf you’re using it right then [] is still an array subscript, just with a custom implementation for getting array elements