Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] variant with tuple arg in pattern match?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Chris Hecker <checker@d...>
Subject: Re: [Caml-list] variant with tuple arg in pattern match?

>I would certainly like it if Caml could:
>  1) Treat this entirely as an optimization issue and not make a syntactic
>distinction.

I agree.  Is there a reason why it's done this way?  I guess you need to be able to bind another name to the tuple independently, and for that to work you need it to be another block on the heap.  Maybe it's not possible in general to do the right thing.  

But wait, why isn't this a problem even with normal non-tupled values?

In other worlds, how does type foo = Foo of int work when I take a reference to the int?  It has to know I'm refering to the int to GC correctly.  Why is the tuple version any different?

I'm confused.

Chris

-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr