[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Am I stupid?





William Thompson wrote:

> Bob Crawford <r_w_crawford@yahoo.com> writes:
>
> >H C Pumphrey wrote:
>
> >> In article <onn16cvpe1.fsf@cow.physics.wisc.edu>, Craig Markwardt <craigmnet@cow.physics.wisc.edu> writes:
> >> |> Not that [IDL's policy on keyword uniqueness] doesn't frustrate the heck
> >> |> out of me sometimes.  There
> >> |> are many times where I want keywords like TIME, TIMEUNIT, TIMESTEP,
> >> |> and so on.  My suggestion is that the above policy should hold,
> >> |> *unless* there is an exact match to a specific keyword.
> >>
> >> That seems to be what R [1] does already. Apart from this special case, I don't
> >> see any way around it, not without IDL having a direct link to your
> >> subconscious so that it can tell which out of TIME, TIMEUNIT and TIMESTEP
> >> you meant when you said FOO,TI=137
>
> >... but it should know what you meant when you say: FOO, TIME=37
>
> >Bob.
> >(sometimes frustrated too)
>
> It is quite possible to redefine the rules such that one could unambiguously
> have the keywords TIME and TIMESTEP simultaneously.  However, consider what
> happens when a user mistakenly abbreviates TIMESTEP=3 to TIME=3.  Under the
> present rules, IDL signals that a possible error has occured.  But with the
> proposed new rules, no error message would be generated--it would just happily
> go ahead and do the wrong thing!

<snip>

However the current rules are also error prone. Single character typos are common, and the allowal of
abbreviations means that arguments that disagree in more than one character, can still be confused with one
another by a single character mistake. In particular I am prone to accidently converting singulars to plurals
and vice versa. In this case, I suspect that I would frequently type TIMES=37 and have it interpretted as
TIMESTEP when I meant TIME.