newbie question

Thomas Lindgren <>
Tue May 24 15:43:18 CEST 2005


--- "Richard A. O'Keefe" <> wrote:
> Thomas Lindgren <> wrote:
> > /.../
> ... at least
> some of us
> carefully *avoid* the non-constant-time guards.  Is
> there a compiler
> option I have missed to ask for warnings about them?

Not as far as I know.

> 	In summary, my main gripe with guards echoes yours:
> if
> 	keeping guards restricted means we have to write
> 	convoluted case-expressions instead of guards, what
> 	have we gained?
> 
> The opportunity to look at our code and see that it
> can be rewritten
> more cleanly without EITHER using nasty guards OR
> convoluted case-
> expressions, perhaps?  In order words, I deny the
> "HAVE TO" part of
> your "if".

Ah, that "HAVE TO" wasn't meant to be quite so
universal. Still, assuming that we want to encapsulate
and abstract, we seem to be stuck with avoiding guards
for that sort of code.

Um, I'm running out of time so that has to be it for
now. It seems 'cond' will provide a replacement for
some uses of if (similar to what you suggest
subsequently), so perhaps the issue is growing moot.

Best,
Thomas
 


		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 



More information about the erlang-questions mailing list