Re: wishlist: user-declared parameter labels without "given"
Re: wishlist: user-declared parameter labels without "given"
- Subject: Re: wishlist: user-declared parameter labels without "given"
- From: "Arthur J Knapp" <email@hidden>
- Date: Sat, 31 Mar 2001 19:08:33 -0500
>
Date: Sun, 01 Apr 2001 05:19:12 +1000
>
Subject: wishlist: user-declared parameter labels without "given"
>
From: Timothy Bates <email@hidden>
>
it would be fantastic to be able to say
>
>
getasample taking 3 from list {1,2,3,4} without replacing
>
>
instead of
>
getaSample without Replacement given howmany:3, sourceList:{1, 2, 3, 4})
If you say so. :)
When I read scripts that make use of the labeled-parameter syntax,
I get a headache. There is a part of my brain that just can't sort
out which are the keywords, which are the variables, etc... :-0
>
or the inscrutable
>
>
getasample(2,{1,2,3,4},false)
>
>
>
That would mean that our functions could be as readble as scripting
>
additions (which can define labels for their parameters).
The compromise might be to write your handlers to take a single
record as a parameter:
getasample( { taking: 3, from_list: {1, 2, 3, 4}, replacing: false } )
on getasample( reco )
if ( taking of reco = 3 ) then
-- etc...
This is perhaps slightly less "inscrutable". :)
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
http://home.earthlink.net/~eagrant/