Stop suppressing warnings/erros with @? - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8) +--- Thread: Stop suppressing warnings/erros with @? (/showthread.php?tid=1094) |
Stop suppressing warnings/erros with @? - Knitter - 2010-11-02 I believe the title says it all I would request that the devs stop using the suppressing operator as it causes more wrong than good. The suppress operator is slower and shows a type o programming that should only be seen on new programmers. There are several places to look for why the use of @ is not recommended but I think the following reasons are enough to rethink the use of the operator:
I've seen the use of the @ in cases as simple as accessing a $_GET variable, this should be handled with a simple isset, that is a language construct and thus faster then the suppression or any function, and also makes the code correct. I my understand the easiness in using @ on file access, though I still think it to be wrong, but why use @ instead of a simple isset? I know this can be a personal choice but I think the change is simple and easy to make and that the project will gain from it, resulting in code that does not hide errors or warnings, easing debugging and the discovery of any hidden bug due to server settings differences. Your thoughts on the subject? Regards, Sérgio Lopes Stop suppressing warnings/erros with @? - Zegnåt - 2010-11-03 No newly added code should have any @, neither should code that has recently been updated. Most @-suppressing stems from the first versions of GetSimple. We completely agree with you, we just haven’t gone through all the files yet. Stop suppressing warnings/erros with @? - Knitter - 2010-11-03 OK, I'll try to either indicate any file that still uses the @ or provide a patch that removes those that are still around. Thanks for the quick answer. Regards, Sérgio Lopes |