On Mon, Jul 23, 2012 at 4:57 PM, Dan Bron <j...@bron.us> wrote: > Raul wrote: >> It's defined as having an empty domain -- >> why not rely on the definition being >> accurate? > > Cap's raison d'etre is grammatical, not semantic. That it is a verb, and > that its domain is defined to be empty, is incidental. I prefer for my code > to recognize this, and not hinge on incidentals, or encourage others to do > so.
This kind of reasoning -- that a language primitive should not be treated as having utility explicitly stated in the documentation of that primitive, and obviously present in the implementations -- does not make sense to me. >> I think of a raised error as a "violation of type" issue. > > I think we can agree that one of the guiding principles in the design of J > is "graceful degradation"; witness, e.g., %. which has rank 2 but works "as > expected" on vector and scalar arguments. There are innumerable other > examples. I prefer to maintain this principle as far as I can, in my own J > code. Of course, there always comes a tipping point, but one hopes to defer > that as long as possible (or reasonable). But those are not cases where either the implementation or the dictionary state that there should be an error. So I am not sure how this observation is relevant in this context. (Unless, for example, you are considering errors like length error. But I think we can agree that length error from %. constitutes an error in the code which provides the data?) Am I missing something here? Thanks, -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm