Matching elements of records

David Hopwood david.nospam.hopwood@REDACTED
Thu Oct 28 12:07:36 CEST 2004


Richard A. O'Keefe wrote:

> I pointed out that the other funcitonal programming languages
> I use only support the <as-variable> before <as-pattern> usage,
> not the reversed usage.
> 
> David Hopwood <david.nospam.hopwood@REDACTED> wrote:
> 	
> 	The general case (supported by several languages including Oz
> 	and E, for example) is
> 	
> I know perfectly well what the general case is.  The only language you
> needed to mention here was Erlang.
> 
> 	and so it makes no sense to disallow the "reversed" special case.
> 	
> This is a non-sequitur.  The fact that some languages (including Erlang)
> allow the reversed case is no reason why it *has* to be used, and saying
> that avoiding a less readable usage "makes no sense" is, um, odd.

I didn't say that avoiding a less readable usage makes no sense. I said
that it makes no sense for a *language* that allows <pattern1> = <pattern2>
to disallow the case <pattern1> = <variable>. *Programmers* may want to
avoid usages that are less readable, but what is more or less readable is
to some extent a matter of opinion (or as you say, a matter of taste).

-- 
David Hopwood <david.nospam.hopwood@REDACTED>




More information about the erlang-questions mailing list