[Ur] Browser-based adventure game
Adam Chlipala
adamc at csail.mit.edu
Wed Oct 12 13:08:03 EDT 2016
On 10/12/2016 12:17 PM, Michael Rohs wrote:
> - What is the type of a function that produces arbitrary HTML snippets. Is xbody correct?
Ur/Web's XML types track context, e.g., body vs. head, which allow
different nested tags. So [xbody] is only the right type for tags that
fit under <body>.
> - What is the name of "show" and "eq" functions? I used "show_list", "show_gameState", "show_pair", and "eq_pair" instead of just "show" and "eq". Is this correct?
That matches conventions I've followed. It would be confusing to shadow
[show] and [eq] themselves, which other code might still expect to use
with other types.
> - Is there a more convenient syntax for list construction than "1 :: 2 :: 3 :: []", something like "[1, 2, 3]"?
Not at the moment. Square brackets are used for another meaning (actual
type parameters to functions).
> - Does Ur/Web do tail-call optimization?
I can confirm a "yes" answer here.
> - Will there be other collections beyond lists (dictionary/map, array)?
No other collection structures are in my mental to-do list for extending
the standard library. I find that most usual applications of those data
structures wind up being done (more declaratively) with SQL instead.
More information about the Ur
mailing list