Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2001-04-04 (19:37)
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

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.


To unsubscribe, mail  Archives: