Post Ast2SbeCfClvZefVey by [email protected] | |
More posts by [email protected] | |
Post #AssxbHGrIDa5DG44Yq by [email protected] | |
0 likes, 1 repeats | |
The pipe operator |>, in some languages, works like this:$a |> b('c&#… | |
Post #AssxbHOepDorbRiIiW by [email protected] | |
0 likes, 1 repeats | |
Note that in either case, the following are likely far more common, and can be … | |
Post #Ast1ZoO7aoTDA41CTI by [email protected] | |
0 likes, 0 repeats | |
@Crell Both should just call `b('c')` — as there is no placeholder fo… | |
Post #Ast1ZoUVD5ZfTr0IPw by [email protected] | |
0 likes, 1 repeats | |
@derickr That's the b('c'){$a) option. | |
Post #Ast2DbRH9lqEaFT3OS by [email protected] | |
0 likes, 0 repeats | |
@Crell No, that's not what I meant. `b('c')` doesn't have a pla… | |
Post #Ast2DbY0kjEGv8cQtM by [email protected] | |
0 likes, 1 repeats | |
@derickr Er, no, it would be invoked as an expression. Whatever it returns wou… | |
Post #Ast2SbQjTHzqtsMkfA by [email protected] | |
0 likes, 0 repeats | |
@Crell why can’t we just do what Clojure did with the threading macros where … | |
Post #Ast2SbWl6sojCZBZ3Y by [email protected] | |
0 likes, 0 repeats | |
@iamnmm Well, -> is already taken. In either case, we will hopefully also g… | |
Post #Ast2SbeCfClvZefVey by [email protected] | |
0 likes, 0 repeats | |
@Crell @iamnmm Clojure-style threading could still be done with different opera… | |
Post #Ast2SblIEqRXvdzAi8 by [email protected] | |
0 likes, 1 repeats | |
@zygous @iamnmm It wouldn't help. PHP supports trailing optional args and … | |
Post #AsywmbI2GjYzTqD5Um by [email protected] | |
0 likes, 0 repeats | |
@Crell @ramsey I voted for option 1, but I could see option 2 if all arguments … | |
Post #AsywmbP7qNEbppWkXw by [email protected] | |
0 likes, 0 repeats | |
@jornane @ramsey That would only sometimes work, because of optional and variad… | |
Post #AsywmbVrRKceAig82q by [email protected] | |
0 likes, 0 repeats | |
@Crell @ramsey Not fuzzy at all; the first positional argument is the argument … | |
Post #AsywmbdeyKrQYuKMCW by [email protected] | |
0 likes, 0 repeats | |
@Crell @ramsey In other words; the call after |> can only contain named argu… | |
Post #AsywmbkkXyX2ute1Fg by [email protected] | |
0 likes, 0 repeats | |
@Crell @ramsey The reason I would be against option 1 without the named argumen… | |
Post #Asywmbr8AFdVEgd7CK by [email protected] | |
0 likes, 0 repeats | |
@Crell @ramsey With increased cognitive load I mean that when I see this in cod… | |
Post #AsywmbzHfw9rdyRcuG by [email protected] | |
0 likes, 0 repeats | |
@Crell @ramsey When I try to run htmlspecialchars(ENT_QUOTES), the result is &#… | |
Post #Asywmc7RBcgE3GG8cC by [email protected] | |
0 likes, 1 repeats | |
@jornane @Crell This might be okay until you run into libraries that use `@ no-… | |
Post #Asz0iGcFal341Gr2si by [email protected] | |
0 likes, 0 repeats | |
@ramsey @Crell Then you can't use the pipe syntax with those libraries. Exc… | |
Post #Asz0iGiHELrwJxfrH6 by [email protected] | |
0 likes, 1 repeats | |
@jornane @Crell I think that’s a big thumbing of the nose to libraries that h… | |
Post #AtaCD8QgMpZdx0smCe by [email protected] | |
0 likes, 0 repeats | |
@ramsey @Crell If that would be prohibitive to requiring named arguments as des… | |
Post #AtaCD8YTtpoQLCX0MK by [email protected] | |
0 likes, 0 repeats | |
@jornane @Crell This is why I’m supportive of a placeholder argument. | |
Post #AtaCD8fvS9lciI0wxk by [email protected] | |
0 likes, 0 repeats | |
@jornane @Crell And option 2 is the only option that allows future introduction… | |
Post #AtaCD8lb74IuzsfTns by [email protected] | |
0 likes, 0 repeats | |
@ramsey @Crell I've now read the placeholder RFC, I would be in favour of t… | |
Post #AtaCD8sKi1gxKlorIm by [email protected] | |
0 likes, 0 repeats | |
@ramsey @Crell If placeholders are considered, it's possible to make the re… |