[eeps] Multi-Parameter Typechecking BIFs

mats cronqvist <>
Thu Feb 19 13:15:52 CET 2009

Vlad Dumitrescu <> writes:

> On Thu, Feb 19, 2009 at 00:22, Richard O'Keefe <> wrote:
>> On 19 Feb 2009, at 7:30 am, James Hague wrote:
>> [an EEP suggesting that is_T(X1, ..., Xn) in a guard should
>>  have the same meaning as is_T(X1), ..., is_T(Xn).]
>> However, may I respectfully suggest that this is yet
>> ANOTHER problem that is better handled by abstract patterns?
> Hi,
> Yes, this works in this case, but one may have something like
>     func({_,X,_,Z}, [{_,Y,A} | _]) when is_float(X,Y,Z,A) ->...
> so IMHO this shortcut is still useful.

  the problem I have with this proposal is that it does not address
what, IMO, is the fundamental problem; that I have to correlate the X
at the beginning of the line with the X at the end of the line. 

  I think something like this would be much better:

func({_,X::float,_,Z::float}, [{_,Y::float,A::float} | _]) ->...

  This has been proposed before, and rejected for no good reason (that
I can remember).


More information about the eeps mailing list