Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Again on pattern matching and strings
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stefano Zacchiroli <zack@c...>
Subject: Re: [Caml-list] Again on pattern matching and strings
On Thu, Oct 24, 2002 at 09:10:15AM +0200, Alessandro Baretta wrote:
> Eh, no! This is really unacceptable as a general solution. 
> Of course, I could have coded my function this way, but this 
> technique is not scalable, especially from the perspective 
> of computational efficiency. Your code is compiled as a 

Yes, but your mail, expecially the part I quoted, complained about
elegancy of the code, not about efficiency.

> >Anyway from a more general point of view I'm also interested in seeing
> >"aliasing" or constant definition in the compiler, it is of general
> >interest, not only in pattern matching.
> 
> To my great surprise, I'm unable to think of an example 
> relating to anything other than pattern matching.

For example: the classic magic numbers problem used in almost all
programs, for example a global variable "debug" which can be safely a
constant (or an alias as you called it) instead of a global "let val".

Cheers.

-- 
Stefano Zacchiroli - undergraduate student of CS @ Univ. Bologna, Italy
zack@cs.unibo.it | ICQ# 33538863 | http://www.cs.unibo.it/~zacchiro
"I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!" -- G.Romney
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners