• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: wishlist: user-declared parameter labels without "given"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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/


  • Prev by Date: Re: is it possible to load a script library with a creation
  • Next by Date: Re: Database question
  • Previous by thread: Re: is it possible to load a script library with a creation
  • Next by thread: Re: Database question
  • Index(es):
    • Date
    • Thread