[bitc-dev] Syntax Poll: Polymorphic Types

Rick R rick.richardson at gmail.com
Thu Mar 5 13:15:21 EST 2009


There is a tiny part of me that agrees because I'm from a C++ background.

list<MyType>

I'm sure this would be a pain to parse, and not even that helpful for it's
work, but could there be an "of" operator that would make this explicit?

possibly allow both
list of MyType
and
MyType list.

(actually.. on second thought.. I still prefer the latter)


On Thu, Mar 5, 2009 at 1:01 PM, Jonathan S. Shapiro <shap at eros-os.com>wrote:

> On Thu, Mar 5, 2009 at 12:52 PM, Rick R <rick.richardson at gmail.com> wrote:
> > Perhaps I'm missing something here, but how would postfix notation be at
> all
> > helpful for type construction? It seems like every sane language puts the
> > Constructor name 1st.
>
> It's subjectively more readable:
>
>   char list   vs.   list [of] char.
>
> >From my perspective, the concern would be on the one hand that this
> readability may not extend gracefully to multiple type arguments (in
> OCaml these are parenthesized), but on the other that the prefix
> notation wants to look like application, and I'm not sure how that's
> going to work out (need to try it in the parser).
>
> shap
> _______________________________________________
> bitc-dev mailing list
> bitc-dev at coyotos.org
> http://www.coyotos.org/mailman/listinfo/bitc-dev
>



-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.coyotos.org/pipermail/bitc-dev/attachments/20090305/664b2f24/attachment.html 


More information about the bitc-dev mailing list