[Ur] stateful structure?

Gergely Buday gbuday at gmail.com
Thu Nov 3 08:48:22 EDT 2011


Adam wrote:

>> Ok, but there is another problem here. How can I refer from an
>> identifier to a value? A handy solution would be a hash table in perl
>> or an array in other languages, but these are not available in Ur.
>
> I wouldn't advise taking Marc's choice of identifier literally.  You would
> represent [counter_id] as the data you need, rather than a key into a table
> containing that data.  I would just call the type [t], personally, and
> definitely not include "ID" anywhere in the name.
>
> This seems just like what one often does in SML or OCaml, so you might want
> to consult resources on those languages.

I do not see what do you refer to. Could you give more details?

- Gergely



More information about the Ur mailing list