Mike;<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
</div>FWIW, Java complains, however, C++ silently returns 0.0--or at least<br>
prints a 0.0. I think that it matters less which solution ChucK uses<br>
than the idea that it's clear about it. i.e. ChucK should complain,<br>
or avoid the error, but definitely not return a null object reference.<br>
</blockquote></div><br>I agree; I'm leaning towards a runtime notice with the name of the function listed if it goes wrong (in addition to either dropping the shred or returning a new instance or zero value of whatever the type of the function) and a compile time complaint if such a function doesn't contain the word "return" at all.<br>
<br>That would allow nearly everything that currently runs to keep running, no matter how dangerous the construction, yet provide notices if we made a error. <br><br>I'm not in favour of ChucK baby-sitting me when I may be doing something that ChucK thinks is dangerous even when I know it's fine in this context; the parser may make less real errors than I do but I'm still convinced I'm more clever than the parser is.<br>
<br>Kas.<br>