Well, there's plenty of ideas here. I shall try them all and see where
the gotchas are. It doesn't have to work every time. But I want it to
crash properly, and not go hiding bugs all over the place like the
KGB.

I'm glad there are other folk with my brand of paranoia. A rare thing,
as it happens, among APLers, who largely despise such measures. Some
of these guys get a buzz from debugging... and write code so as to
generate the maximum fun for themselves.

I've seen $millions spent (=wasted) turning one man's funky prototype
into a maintainable product. So I have an attitude to all this. Oh,
and whenever I hear the word "efficiency" I reach for my Browning. :-P

Another thing I'd really like in J (and rookies shouldn't be allowed
to ask such things) is something like the C++ "const". A way of
locking down the name of a quantity so that it can't be changed during
"the run", whatever that is -- at least not without raising an error.
Or (like []WATCHPOINTS in APL+Win) firing an event -- but that has
other smart possibilities.

I'm a gui programmer. One of those people with 1001 different names
for zero and one. If all these constants are assigned as globals (in
APL I use niladics, which permits me to comment each one, not to say
log its usage) then sure as eggs is eggs one day I'm gonna write:

if. replyYES=.y do. ...

and bang goes my Mars mission, plus another evening wasted.

Ian


On Fri, Jan 22, 2010 at 5:01 AM, Raul Miller <[email protected]> wrote:
> On Thu, Jan 21, 2010 at 10:45 PM, Dan Bron <[email protected]> wrote:
>>        *  The adverb won't actually work if its input is boxed.  You'd
>> probably want to say something along the lines of  'y' e.&;:S:0 m  but I
>> haven't tested that either.
>
> Oops,  yes, if the input is boxed, we will get a domain error
> from the assert sentence.
>
> To get rid of this we would probably want to use S:0 and ravel.
>
> But, yes, erasing y would be more paranoid (though less
> efficient since it must happen at run time rather than
> definition time).
>
> --
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to