Arc Forumnew | comments | leaders | submitlogin
7 points by kens 6071 days ago | link | parent

One question I have after reading that article: why doesn't Arc have keyword parameters? The article makes keyword parameters sound like the best thing since sliced bread, so it's a bit surprising that they aren't in Arc.

My guess on why the web server uses CPS rather than native continuations is that web pages inherently have many branches (e.g. multiple links), and that's easier to program with multiple continuation functions than with first-class continuations. (At least I don't see an easy way to do it with first-class continuations.)



4 points by drcode 6071 days ago | link

I would guess that pg is hoping hash tables and alists can fill the roles that keyword parameters otherwise would be used for... "need keyword parameters? have the function accept an alist."

-----

4 points by almkglor 6071 days ago | link

Yes, but it's horribly inconvenient to access.

Same with defop. Accessing the GET/POST arguments to an operation is done via (arg req "foo"). It would have been worlds nicer if I could just define something like

  (defop foo-getter req
   (w/args (foo bar) req)
     (...))

-----

2 points by jmatt 6070 days ago | link

I have wondered a few times why arc doesn't have keyword parameters. It is one of my favorite features in Gauche scheme. Other great features are clos like object system, module system and a thread system that supports preemption which is hard to find in scheme implementations.

In addition, I think keywords would make the library far more transparent. Right now I still have to root around and figure out what the heck I'm supposed to pass in.

-----