Re: Bug in 4.0.5? EUI, no warning for unused procedures/functions
- Posted by DerekParnell (admin) Feb 13, 2013
- 1364 views
Sometimes I wish I could just leave things alone...
Yep ...
It's not a bug because interpreted Euphoria was not designed to give warnings about un-referenced routines.
To me that reads the same as:
It's not a bug because Euphoria was not designed to be helpful.
- What is helpful for one may be not so to another.
- There are many things that could have been added to the language that would be seen as helpful to some so does that also imply that the omission of these are all bugs? For example, parse-time enforcement of datatype usage.
- I'm pretty sure that as Euphoria is evolving, it is becoming more helpful. There are things in place now, which were never in Rob's edition of the language, that can be argued are helpful additions. This particular suggested enhancement would be helpful to some and that is why I recommend that it be added as a request for a future edition of the language.
-- Example of Parse-Time Datatyping. procedure Sample(integer x) -- do something with 'x' end procedure Sample("ABC") -- Fails at run time rather than at parse-time.
While developing a program or module, it is very common to have routines that are not used yet. That is why I would suggest that the -STRICT option be used to trigger the warnings.
And if it did issue warnings that would anger or annoy you how, exactly?
It would not anger me, and I don't know where you got that idea from, but anyhow ... I can imagine that while developing an application or module, that during the repeated testing of it, messages that constantly reminded me that I haven't yet used certain routines would get tiresome and/or possibly mess up the intended console output of the program. However, towards the end of development or at specific cadence points in the development cycle, using the -STRICT command line option to double check for silly mistakes, would be a good idea, IMO.