| Store | Cart

Re: [TCLCORE] There is no justification for modifying [proc] for named parameters

From: Alexandre Ferrieux <alex...@gmail.com>
Sun, 21 May 2017 02:01:07 +0200
On Sat, May 20, 2017 at 4:06 PM, Mathieu Lafon <mla...@gmail.com> wrote:
> Regarding the two proposals made by Alexandre :>> - Adding a new FAproc command will require to duplicate a lot of code> already present in proc, leading to more maintenance. Users may find> confusing to have a separate command and new users may not find it.

I concur with Colin's answer to this: appropriate refactoring may
avoid any duplication. But never mind, as stated, this is not my
preferred choice.

> - Adding a runtime handler seems to be limited to argument parsing,> where the current proposal is a base framework which can be easily> extended to later support other usecase on proc arguments (type> assertion, doc-string, ...).

Yes, and to me this lack of ambition is a bonus. Think KISS principle.
Do one thing at a time, and do it right. Don't open a Pandora box on
vague promises.
In this specific case:  type assertions and doc strings can quite
easily fit in handlers too, or in formatted comments at the top of the
proc's body.

>  Unless I don't get the intent, it seems> necessary to specify the named arguments when calling the command.> Users may find counter-intuitive to have to specify the arguments in a> second time (I assume proc only use 'args' in that case).

Please give an example, I'm lost. You may even give a hefty list of
them, as an exercise for me to map to [eatargs] form :)

-Alex

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-core

Recent Messages in this Thread
Colin McCormack May 20, 2017 03:11 am
Mathieu Lafon May 20, 2017 08:38 am
Colin McCormack May 20, 2017 08:53 am
Colin McCormack May 20, 2017 08:58 am
Mathieu Lafon May 20, 2017 10:09 am
Colin McCormack May 20, 2017 10:15 am
Colin McCormack May 20, 2017 10:16 am
Colin McCormack May 20, 2017 10:23 am
Mathieu Lafon May 20, 2017 10:31 am
Colin McCormack May 20, 2017 10:41 am
Colin McCormack May 20, 2017 10:54 am
Colin McCormack May 20, 2017 10:54 am
Mathieu Lafon May 20, 2017 02:06 pm
Colin McCormack May 20, 2017 02:53 pm
Alexandre Ferrieux May 21, 2017 12:01 am
Colin McCormack May 21, 2017 01:16 am
Colin McCormack May 21, 2017 02:04 am
Mathieu Lafon May 21, 2017 11:27 am
Alexandre Ferrieux May 21, 2017 01:06 pm
Kevin Kenny May 20, 2017 02:01 pm
Colin McCormack May 20, 2017 02:39 pm
Colin McCormack May 20, 2017 11:58 pm
Alexandre Ferrieux May 20, 2017 09:12 am
Colin McCormack May 20, 2017 09:45 am
Peter da Silva May 22, 2017 11:42 am
Colin McCormack May 22, 2017 12:05 pm
Messages in this thread