3 ms·
My (arc-like) lisp dialect has pervasive python-style keyword args, which I find makes code easier to read. See, for example, https://github.com/akkartik/wart/b
by akkartik 15y ago
My (arc-like) lisp dialect has pervasive python-style keyword args, which I find makes code easier to read. See, for example, https://github.com/akkartik/wart/blob/master/063http-get.wtst https://github.com/akkartik/wart/blob/master/063http-get.wts.... Tokens starting with a ':' are keyword args. Removing them doesn't change program behavior.
You don't have to use them, but I find inserting the odd keyword arg makes things much easier to read.
- BruceForth 15y agoI think Python-style implicit kw-args are a mistake. It means that caller can depend on the name of your function parameters and you can't change them without breaking existing code, which may not be yours. Explicit kw-args, where the names of params are explicitly advertised as part of the interface of the function, are a fine idea OTOH, and should be in every language.
- akkartik 15y agoUpvoted. We'll have to agree to disagree on this. I don't see why the number and semantics of arguments can be part of the interface but it's bad for the name to be. Also, wart is like arc in that it's utterly unconcerned about backwards compatibility. It's not meant for building large edifices. That doesn't mean you can't build webapps in it. It does mean that you better write lots of unit tests.