This page is part of the web mail archives of SRFI 89 from before July 7th, 2015. The new archives for SRFI 89 contain all messages, not just those from before July 7th, 2015.
On Apr 13, felix winkelmann wrote: > On 4/13/06, Eli Barzilay <email@example.com> wrote: > > > > > [...] It's just to easy to put a keyword-enabled interface onto > > > everything. [...] > > > > and that's a very good argument for this srfi. > > It seems you're trying violently to misunderstand me: (You keep contradicting your own argument. At least IMO.) > it's *too* easy: you quickly end up with a small set of functions > with loads of keyword parameters and yet another open manual to > consult. OK, consider what users need to know for a second. With common Scheme code, if you want to extend a function in a way that doesn't break existing code, you add optional arguments. Say you begin with something like: (message-box <title> <prompt>) You then extend it with (in this order) a csutomizable button-spec ('yes-no, 'ok-cancel, 'ok, default is 'ok), timeout (number of seconds, or #f for no timeout), whether the dialog is on top of the main application or not (defaults to #t), and a bgcolor (defaults to (system-bg)): (message-box <title> <prompt> [buttons] [timeout] [on-top?] [bgcolor]) The defaults are the same as the original version -- so no change needed there. Now you want to pop a blue message box, what do you do? (message-box "title" "prompt" 'ok #f #t "blue") ...and you need to read through that whole paragraph above to do this. This is in contrast to (message-box "title" "prompt" :bgcolor "blue") with no knowledge of the rest. You'll always need the manual, but you don't need to read it through to just change the bgcolor. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life!