Geoffrey.Coram wrote:
>Actually, Kevin - removal of the default value from the syntax
>(in the case where the range is specified) was considered
>already, it's section 7.1 in the proposal document, and if
>you read it, you'll see why we didn't like the idea of
>"required parameters."
>
>-Geoffrey
>
>
It's an elaboration-time check, you wouldn't get as far as running
simulation, i.e. if the simulator finds a required parameter missing
it would not be able to complete elaboration.
As languages and designs get bigger and more complicated it's important
to remove the possibility of accidental error since the source of errors
become harder to find. Arbitrary (valid) defaults and user-written
check code are a good source for errors :-)
BTW, there's a similar argument against using NaN (not a number) and
having NaN assigned to a branch be a run-time error: users don't want
there simulation to die after n hours etc. However, my view is that if
it's going to fail it should fail in simulation and not in Silicon (the
latter is very expensive). Any attempt to make "bad" models behave well
in simulation is misguided (IMO).
Kev.
>Kevin Cameron wrote:
>
>
>>I don't think it would be a big battle since there is no backward-compatibility conflict, and it adds useful functionality for the user (they don't have to add code to check their parameter didn't get set, and less chance of accidental error). The two conflicting syntaxes for declaring ranges are more likely to be a problem.
>>
>>
-- Kevin Cameron, CPU Technology, CA 94588, Tel.: (925) 225 4862Received on Fri May 21 11:20:44 2004
This archive was generated by hypermail 2.1.8 : Fri May 21 2004 - 11:21:22 PDT