if the Julia syntax was actually x in y, I'd have less of an objection, but 
while it looks like a function call, the message receiver should be the 
first argument.

On Sunday, January 11, 2015 at 1:10:28 PM UTC-8, Jake Bolewski wrote:
>
> `in` is most often used with infix notation (ex. 1 in [1,2,3])?
>
> On Sunday, January 11, 2015 at 4:00:37 PM UTC-5, Michael Landis wrote:
>>
>> Most Julia built-ins are defined so that the first argument is the 
>> (Smalltalk style) message receiver, but in(x,y) reverses the apparent 
>> standard, testing whether x is in y (the message receiver).
>>
>> append(x,y) appends y to x (the message receiver);
>> push(x,y) pushes y onto x (the message receiver);
>> in(x,y) should test whether y is in x, not the reverse.
>>
>> IMO, defeating orthogonality is a mistake.  What's the justification for 
>> 'in()' violating the usual message receiver semantics?
>>
>

Reply via email to