Re: Short-circuit warning

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

Jason Gade wrote:
>  
> No one is talking about doing away with short circuiting. We're talking about
> whether there should be a warning in the short circuiting case.
> 

Here is my proposal. Add an option to ecu/ex/exw/exwc called -lint. lint is a
common tool name that checks for common mistakes that may pass the parser but may
cause problems later.

Disable such warnings as Short-circuit. Encourage new programmers to use the
-lint option frequently to analyze their code. After a very short amount of time
even a new programmer should not need the short circuit warning.

Euphoria may be a good first programming language but the percentage of people
who are using Euphoria as a first language I would say is low (but that is just a
guess, I have no data to back that up except that the questions asked here in
EUforum are not newbie type questions). Now, even when a newbie comes or if we
have a lot of newbies, they are new and they are going to have to spend much time
in the manual to do anything. They need to learn and they will learn or they will
quit.

You cannot be a new programmer and not spend time in a manual. The fact that you
are new probably means you do not understand many things and you will be reading,
you will be asking question.

The Euphoria users manual has an entire section on Short Circuiting that is
quite good.

Let's rely on the Users Manual to help new programmers. That's where they should
be. Let's not clutter the output of an advanced program with multiple pages of
warnings about common newbie mistakes, and that is no joke. I began programming
the PgSQL wrapper and I converted all the PgSQL types, error messages and other
constants over, than began programming. My first test had 9 pages of warnings. I
couldn't see the output of my program even. I could have added a wait_key() but I
was doing automated testing on it checking the exit code. I wound up disabling
warnings which made me miss a few good ones that could have helped.

We should program, see real warnings, we should run exwc -lint on our programs
once in a while or as often as we would like. But polluting the output w/so many
warnings that real warnings or program output cannot be found is counter
productive.

--
Jeremy Cowgar
http://jeremy.cowgar.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu