[NASL2] Metaphysical question on null values

Michel Arboi <[email protected]>
Newsgroups gmane.comp.security.nessus.devel
Organization Compilo ergo sum
Message-ID <[email protected]>
NASL2 knows about uninitialized variables and have a NULL constant.

The code about addition, substraction and array indexing was rather
logical : adding or substracting anything to / from an undefined value
is undefined, and accessing an array element with an undefined index
is undefined too.
However, all this is silent and can be badly surprising.
So... Either we shout every time we try such an operation, or we
consider those undefined values as 0, at least for + - and [ ]
I was ready to vote for the 2nd option and started modifying the code,
but is this _really_ wise?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.