Mike Pastore wrote: > Ken Fox wrote: > > > Although, I suppose '&' would not work. > > > > Why not? I think it would work great. > > Well, what's the different between the placeholder &foo and the sub > &foo? That's the main reason why. Also, '&' already has a perfectly good > meaning: binary AND with the function foo(). :) Not trying to be a > smartass, but I think you understand what I'm trying to say. Ha ha. ;P Actually I was wrong about ^ not working. The binary operator ^ is XOR. The unary "operator" ^ could be for curries. I still like &? and &0, &1, ... best though. The common form &? is not likely to be accidentally typed either. BTW, the number represents the order of the argument in the function -- the arguments don't have to be in the order they appear in the expression. The major failure of this syntax is it doesn't allow named placeholders, only numbered. I think being able to control the order of the arguments is more important than naming them. If the function is so big you forget what &1 and &2 mean, then I think the curry needs a helper function. I like ^ better than Damian's original though. (And we could add ^0, ^1, etc. to the proposal.) - Ken
- Re: Different higher-order func notation? (was Re: RFC 23 ... Mike Pastore
- Re: Different higher-order func notation? (was Re: RF... Nathan Wiger
- Re: Different higher-order func notation? (was Re... Jeremy Howard
- Re: Different higher-order func notation? (wa... John Porter
- Re: Different higher-order func notation? (was Re... Damian Conway
- Re: Different higher-order func notation? (was Re... Mike Pastore
- Re: Different higher-order func notation? (was Re... John Porter
- Re: Different higher-order func notation? (was Re: RF... Ken Fox
- Re: Different higher-order func notation? (was Re... Mike Pastore
- Re: Different higher-order func notation? (wa... Nathan Wiger
- Re: Different higher-order func notation? (wa... Ken Fox
- Re: Different higher-order func notation? (wa... Jeremy Howard
- Re: Different higher-order func notation? (wa... Ken Fox
- Re: Different higher-order func notation? (wa... Mike Pastore
- Re: Different higher-order func notation? (wa... Jeremy Howard
- Re: Different higher-order func notation? (wa... Nathan Wiger
- Re: Different higher-order func notation? (wa... Damian Conway
- Re: Different higher-order func notation? (wa... Jeremy Howard
- Re: Different higher-order func notation? (wa... Damian Conway
- Re: Different higher-order func notation? (wa... Jeremy Howard
- Re: Different higher-order func notation? (wa... Glenn Linderman