1. request for change
- Posted by Bernie Ryan <xotron at ??uefrog.com> Jan 08, 2008
- 703 views
with/without warning should be reversed. The major use of 'with warning' is to look for unused variables/constants when writing a program. It seems that everyone that posts a program in the archives places 'without warning' at the top of their final program. That does not make sense to me; Why isn't 'without warning' the default ? Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
2. Re: request for change
- Posted by c.k.lester <euphoric at ckl?ster.c?m> Jan 08, 2008
- 633 views
Bernie Ryan wrote: > > with/without warning should be reversed. > > That does not make sense to me; Why isn't 'without warning' the default ? Good point.
3. Re: request for change
- Posted by Matt Lewis <matthewwalkerlewis at g?ail.?om> Jan 08, 2008
- 649 views
Bernie Ryan wrote: > > > with/without warning should be reversed. > > The major use of 'with warning' is to look for unused variables/constants > when writing a program. > > It seems that everyone that posts a program in the archives places > 'without warning' at the top of their final program. > > That does not make sense to me; Why isn't 'without warning' the default ? Because the warnings are there for a reason. Some are more useful than others. It's reasonable for released code to have "without warning" at the top. It's presumably been tested by the author. One would hope that he'd fixed any dangerous warnings before releasing his code. The defaults are correct. Matt
4. Re: request for change
- Posted by c.k.lester <euphoric at cklest?r?com> Jan 08, 2008
- 687 views
- Last edited Jan 09, 2008
Matt Lewis wrote: > Bernie Ryan wrote: > > with/without warning should be reversed. > Because the warnings are there for a reason. Some are more useful than > others. It's reasonable for released code to have "without warning" > at the top. It's presumably been tested by the author. One would hope > that he'd fixed any dangerous warnings before releasing his code. Good point.
5. Re: request for change
- Posted by Bernie Ryan <xotron at bluefrog.??m> Jan 08, 2008
- 663 views
- Last edited Jan 09, 2008
Matt Lewis wrote: > > Bernie Ryan wrote: > > > > > > with/without warning should be reversed. > > > > The major use of 'with warning' is to look for unused variables/constants > > when writing a program. > > > > It seems that everyone that posts a program in the archives places > > 'without warning' at the top of their final program. > > > > That does not make sense to me; Why isn't 'without warning' the default ? > > Because the warnings are there for a reason. Some are more useful than > others. It's reasonable for released code to have "without warning" > at the top. It's presumably been tested by the author. One would hope > that he'd fixed any dangerous warnings before releasing his code. > > The defaults are correct. > Matt: 'without warning' is used by lazy programmers that don't want to be bothered with cleaning up their programs by removing unused variables. Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
6. Re: request for change
- Posted by Matt Lewis <matthewwalkerlewis at ?ma?l.com> Jan 08, 2008
- 623 views
- Last edited Jan 09, 2008
Bernie Ryan wrote: > > 'without warning' is used by lazy programmers that don't > want to be bothered with cleaning up their programs by > removing unused variables. Yes, that happens, but not always because the programmer is lazy. There are many times that unused variables can't be removed, like when they are part of an event handler callback, and the processing doesn't need to use all of the parameters. Or it could be that the warning is about a possible short circuit in an if statement, where that is exactly what the programmer wants. There's also the case of unused global constants that are part of a library, and so might be used by clients (or not, but that's not a good reason to eliminate them). Of course, the better solution for that is to put without warning at the bottom of the file. In any case, your argument doesn't support changing the defaults. It's the equivalent of, "Some people abuse this, so let's just give up and stop issuing warnings at all." I think it's better to require affirmative action from the programmer to turn off the warnings. If we had multiple levels of warning, then we could debate about the proper default warning level, but since we only have one, I think it's obvious that the default should be to have warnings on. Matt
7. Re: request for change
- Posted by Pete Lomax <petelomax at bl?eyond?r.co.uk> Jan 08, 2008
- 660 views
- Last edited Jan 09, 2008
Matt Lewis wrote: > > also the case of unused global constants that are part of a library, (Minor correction: unused global constants, variables, and routines do not generate warnings, for sound reason, nor in fact and to my dislike do unused local routines, it is only unused local constants and variables that trigger such messages.) > I think it's better to require affirmative > action from the programmer to turn off the warnings. I agree, and would even support a ridiculously extreme method of *forcing* every individual warning to be explicitly counteracted, eg:
without warning "parameter self in myhandler is not used" procedure myhandler(integer self, integer msg...
whereby the without warning directive pushes entries onto a stack that are filtered by and popped off by matching warning messages, and generate errors when [any] eof is reached for any left unpopped. Somehow doubt many would want to go that far though Fwiw, Edita does not need any "without warning" statements (though ppp.e has one, I just killed one in pFinet.ew, and not counting arwen). Regards, Pete
8. Re: request for change
- Posted by Juergen Luethje <j.lue at gmx?d?> Jan 08, 2008
- 625 views
- Last edited Jan 09, 2008
Bernie Ryan wrote: > Matt Lewis wrote: > > > > Bernie Ryan wrote: > > > > > > > > > with/without warning should be reversed. > > > > > > The major use of 'with warning' is to look for unused variables/constants > > > when writing a program. > > > > > > It seems that everyone that posts a program in the archives places > > > 'without warning' at the top of their final program. > > > > > > That does not make sense to me; Why isn't 'without warning' the default ? > > > > Because the warnings are there for a reason. Some are more useful than > > others. It's reasonable for released code to have "without warning" > > at the top. It's presumably been tested by the author. One would hope > > that he'd fixed any dangerous warnings before releasing his code. > > > > The defaults are correct. > > > > Matt: > > 'without warning' is used by lazy programmers that don't > want to be bothered with cleaning up their programs by > removing unused variables. So you want to make this the default setting in order to support their lazyness?? Sorry, that's above me. Also, 'without warning' is used by other kinds of programmers as well. Those who appreciate warnings during developement time, and just before releasing the code, they switch warnings off for speed gain. I absolutely agree with Matt, that it's obvious that the default should be to have warnings on. Regards, Juergen -- There are two ways of constructing a software design: One way is to make it so simple that there are /obviously/ no deficiencies and the other is to make it so complicated that there are no /obvious/ deficiencies. [C.A.R. Hoare (1987), The Emperor's Old Clothes]
9. Re: request for change
- Posted by CChris <christian.cuvier at ?gricul?ure.gouv.fr> Jan 08, 2008
- 653 views
- Last edited Jan 09, 2008
Juergen Luethje wrote: > > Bernie Ryan wrote: > > > Matt Lewis wrote: > > > > > > Bernie Ryan wrote: > > > > > > > > > > > > with/without warning should be reversed. > > > > > > > > The major use of 'with warning' is to look for unused > > > > variables/constants > > > > when writing a program. > > > > > > > > It seems that everyone that posts a program in the archives places > > > > 'without warning' at the top of their final program. > > > > > > > > That does not make sense to me; Why isn't 'without warning' the default > > > > ? > > > > > > Because the warnings are there for a reason. Some are more useful than > > > others. It's reasonable for released code to have "without warning" > > > at the top. It's presumably been tested by the author. One would hope > > > that he'd fixed any dangerous warnings before releasing his code. > > > > > > The defaults are correct. > > > > > > > Matt: > > > > 'without warning' is used by lazy programmers that don't > > want to be bothered with cleaning up their programs by > > removing unused variables. > > So you want to make this the default setting in order to support their > lazyness?? > Sorry, that's above me. > > Also, 'without warning' is used by other kinds of programmers as well. > Those who appreciate warnings during developement time, and just before > releasing the code, they switch warnings off for speed gain. I absolutely > agree > with Matt, that it's obvious that the default should be to have > warnings on. > > Regards, > Juergen > > -- > There are two ways of constructing a software design: > One way is to make it so simple that there are /obviously/ no deficiencies > and the other is to make it so complicated that there are no /obvious/ > deficiencies. [C.A.R. Hoare (1987), The Emperor's Old Clothes] My default code template in ConText starts any source file by "without warning", because 95% of those which are emitted are simply useless, when not obnoxious. Ok, perhaps as little as 80%, that's well enough. Hence use the defaults you like. CChris
10. Re: request for change
- Posted by Robert Craig <rds at RapidEu?hor?a.com> Jan 08, 2008
- 650 views
- Last edited Jan 09, 2008
Pete Lomax wrote: > I agree, and would even support a ridiculously extreme method of *forcing* > every > individual warning to be explicitly counteracted, eg: > }}} <eucode> > without warning "parameter self in myhandler is not used" > procedure myhandler(integer self, integer msg... > </eucode> {{{ > whereby the without warning directive pushes entries onto a stack that are > filtered > by and popped off by matching warning messages, and generate errors when [any] > eof is reached for any left unpopped. > > Somehow doubt many would want to go that far though I still kind of like the idea of: without warning "string" where any warning containing the string "string" would be suppressed. i.e. match(string, message) could be used. The usual nested file scope rules for with/without warning would apply for these strings. e.g. without warning "parameter self in myhandler is not used" or to kill a bunch of warnings ... without warning "not used" or without warning "short-circuit" etc. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com