Henry wrote:
>  I think Raul was talking about corner cases in code-recognition space, 
>  not performance.  No matter.

>  Most users understand 'predictable' to mean 'won't take forever 
>  sometimes'.  If a job normally takes 10 seconds, most users would be OK 
>  with having it finish in 1 second one out of 10 times, but not with 
>  finishing in 100 seconds one out of 10 times.

In the worst possible case, if the interpreter doesn't recognize a
particular RTC, then the verb will be execute exactly as slowly as it does
today.

>  One of the problems with tail-recursion optimization in the real world 
>  is that it can be a band-aid for an algorithmic flaw.

This can be said of any high-level construct, and is not specific to J or
TCO.  To take this argument to a silly extreme, if I do not understand the
implications of an algorithm down to how it operates in the transistors (or,
hell, the electrons), I am a negligent programmer.  What level of
abstraction is dependable as a foundation?  How much resolution is "enough"?


>  But you'd better not use [quicksort] in a web server
>  If I were a company, I would probably insist on understanding the 
>  algorithms behind the dyad i. family and /:~,

You are a company, Henry.  You just don't happen to be one that exposes J to
the web.  Should you (and I, and all other J users) suffer because there
some that companies expose J programs to the web?  Is it really J's
responsibility to protect those companies from their own negligence?

Put another way, the context in which a program will be used will impact the
design of that program.  If a given context determines that you should not
use RTC, then it is your duty as a programmer to take that into account when
you write your code.  Don't use RTCs.  

Personally, if I were writing a program that Evil People could access, I
would code with a reasonable level of defense (essentially, restricting
access to the host system, and setting 9!:33 prevent overconsumption for
*any* reason, including unoptimized RTCs.).  But I would certainly not try
to predict every possible abuse my program could be subject to, because (A)
that would take forever and I'd never finish the program and (B) I'd be
wrong in my predictions.  Evil People are sneaky, you know.  Part of my
responsibilities in exposing J programs to Evil People is to keep an eye on
those programs, and fix any flaws the Evil People expose, as they expose
them.  

There are plenty of web-based programs out there that operate this way.
And, I'm willing to be $1, plenty of web-based programs out there written in
TCO languages.

-Dan


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to