Re: [racket-users] API design 2 -- variadic styles

2015-07-07 Thread Matthias Felleisen
I'll second-third Alexis and Stephen. But if you really want these things to run in a Scheme in addition to Racket, you may wish to emulated big-bang and universe style "keywords" because Schemes don't do #:loop keywords. You won't have to change surface syntax or modify the reader of a Scheme

Re: [racket-users] API design 2 -- variadic styles

2015-07-06 Thread Laurent
Point in case: Greg Hendershott's recent blog post about adapting struct constructors to use keyword arguments using syntax-parse. http://www.greghendershott.com/2015/07/keyword-structs-revisited.html On Mon, Jul 6, 2015 at 4:35 PM, Alexis King wrote: > I’ll second Stephen’s point about keyword

Re: [racket-users] API design 2 -- variadic styles

2015-07-06 Thread Alexis King
I’ll second Stephen’s point about keyword arguments. They’re quite common in idiomatic Racket, and they are probably the most direct way to address the points you’ve mentioned. Another tool that Racket gives you to make scripting very easy is the ability to create fairly expressive DSLs with li

Re: [racket-users] API design 2 -- variadic styles

2015-07-06 Thread Stephen Chang
Just realized that the first link is not very useful. These might be more informative: http://docs.racket-lang.org/guide/application.html?q=keyword#%28part._keyword-args%29 http://docs.racket-lang.org/guide/contracts-general-functions.html?q=keyword#%28part._contracts-keywords%29 On Mon, Jul 6, 2

Re: [racket-users] API design 2 -- variadic styles

2015-07-06 Thread Stephen Chang
Racket has linguistic support for keyword arguments, which address many of the issues you raised: http://docs.racket-lang.org/guide/keywords.html Would this help in your case? Additional background: http://www.cs.utah.edu/plt/publications/scheme09-fb.pdf On Mon, Jul 6, 2015 at 10:56 AM, John Car

[racket-users] API design 2 -- variadic styles

2015-07-06 Thread John Carmack
A primary goal of the scripting work is that it should be easy to do easy things. You shouldn't have to specify all the options if you just want to play a sound or show a picture, but you should still be able to get at them when you need them. For the case of a sound effect, all of the followi