[Edu-sig] re: Does edu-sig extend to Jython

Kirby Urner urnerk@qwest.net
Mon, 19 Aug 2002 21:00:30 -0700


At 11:24 PM 8/19/2002 -0400, Arthur wrote:

>Kirby writes -
>
> >What I *don't* think any standard Java API is designed to
> >accommodate is simple parameter switching, i.e. to catch
> >(int a, int b) verus (int b, int a).  Nor even (int a, float b)
> >versus (float b, int a)
>
>I don't pretend to know what is customary - but while
>int a, int b v. int b,int a won't fly I don't see why
>(int a, float b), (float b int a) wouldn't, and if it flies and
>helps - why not use it.

I think it makes the code far too prolix, to invent a method
for every possible permutation of the same arguments.

I guess the way we generally remove non-programmers from the
nitty gritty of an API is to build a GUI.  Pick all your
parameters using widgets and hit "submit", and let the
code sort it out.

Another option is to prompt at the command line.  IDLE has
clue tips for functions when you hit the open paren, and
other shells may go further, with popups ala Microsoft's
"intellisense", showing what all the possible parameters
might be.

Given functions accept doc strings, you could have a standard
way of providing help with the API for all users trying to
use PyGeo in shell mode.

Kirby