On Thu, Mar 5, 2009 at 2:19 PM, Sandro Magi <[email protected]> wrote:
> How are type arguments delineated? I'm not clear on how you plan to
> handle this as opposed to OCaml's "single-arg everywhere" approach.

Good question. Answer still to be determined. In the expression
sub-grammar, though, the currying-style syntax doesn't smell like a
problem. The thing I'm a little worried about (through ignorance) is
interaction with mixfix. Aside: I'm prepared to limit the flexibility
of mixfix to resolve that.

> Either of the above two approaches are perfectly readable, as long as
> you don't introduce bracketing for type arguments ala C#, ie.
> List<char>, which quickly becomes unreadable with nested types.

Agreed. Nothing like that is under consideration.

> type charOrStringList = (char, string) either list
>
> The reverse looks a little more natural to me because I work with C# daily:
>
> type charOrStringList = list either (char, string)
>
> You unwrap this type from left to right, instead of having to check the
> end for the first type to unwrap. Still, it's been awhile since I did
> any serious OCaml programming, so that could just my bias talking.

Great examples. In BitC', the OCamlish possibility I am considering
would rewrite these as:

  char string either list

or

  list (either char string)

I agree that both seem icky, but I don't see any way to evade the
parens in type expressions, because the remaining (non-OCamlish)
alternative would be something like:

  list(either(char, string))

shap
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to