...so this override business

new topic     » topic index » view thread      » older message » newer message

Not the newish keyword but the fundamental principle which existed long before it.

While "more flexible" and other platitudes might appease some people, is there any real need for it? The docs quite rightly do indeed say "would probably break code", so why, exactly, is it there at all?

In the name of all that is holy who in their right mind would override a builtin to adjust some third party code without modifying the source and without the original author's knowledge and expect it to work in the next release, so please don't go there.

When I see s = append(s,q) I would prefer to know instinctively exactly what it does, rather than harbour a nagging doubt at the back of my mind that someone has squirreled away an override in some dim corner that I haven't read yet. Even a one-click check on every keyword would soon add up to quite the extra effort. Is some much-needed refactoring going to switch silently to the original builtin instead of the override, or vice versa, and introduce some subtle bug? Is every line of code I add to anything not known inside out and backwards, potentially introducing a new bug, even if that exact same code works flawlessly everywhere else?

I think I have now convinced myself that it should, nay must, be banned, and trigger new compilation error messages.

Pete

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu