Arc Forumnew | comments | leaders | submitlogin
Keyword args
4 points by mpr 3037 days ago | 1 comment
I'm writing my own implementation of keyword args for arc, but I remember seeing support for them already. Can someone point me toward the relevant links so I can compare/contrast?

Thanks, mpr



3 points by akkartik 3037 days ago | link

As it happens, keyword args were one of my earliest bunny trails, and I obsessed over them for probably five years.

Here's my earliest post about keyword args: http://arclanguage.org/item?id=10692. (Follow-up much later: http://arclanguage.org/item?id=13083)

That got me working on a fork of Arc with keyword args support: https://github.com/akkartik/arc. Original discussion about it: http://arclanguage.org/item?id=12657.

That eventually spiraled out into a whole language with easy keyword args at its core: http://akkartik.name/post/wart. Milestones along the way: http://arclanguage.org/item?id=12814; http://arclanguage.org/item?id=12943; http://arclanguage.org/item?id=15180.

Supporting keyword arguments also led me to param aliases: http://arclanguage.org/item?id=15254. Then to Haskell's as-params: http://arclanguage.org/item?id=16970. Then to multi-word functions, kinda inspired by Objective-C's keyword arguments: http://arclanguage.org/item?id=17233.

Finally -- 3.25 years after I started Wart -- I found a foundational bug in it: http://arclanguage.org/item?id=18371. I eventually fixed it, but the fact that it lay unnoticed for so long killed my motivation to continue supporting keyword arguments. At some point along the way it's become a higher priority to make code testable, and if you have thorough tests then how well some tiny slice of code reads seems a lot lower priority given how complex I found it to create a 'closure' of mechanisms that work seamlessly together and don't have any special-cases: http://akkartik.name/post/readable-bad. So these days I try to ignore keyword args lest my madness return :)

-----