is this related to list comprehensions and/or would extending list 
comprehensions to include conditionals (which must surely happen!) make 
similar syntax elsewhere more likely?

https://github.com/JuliaLang/julia/issues/550

ok, so having read that - surprise! - it's complicated...

andrew

On Wednesday, 19 March 2014 12:35:24 UTC-3, John Myles White wrote:
>
> There's been a discussion of allowing suffix if like in Ruby. Not enough 
> people like it for it to have any traction. 
>
>  -- John 
>
> On Mar 19, 2014, at 8:33 AM, Cristóvão Duarte Sousa 
> <[email protected]<javascript:>> 
> wrote: 
>
> > Hi, 
> > 
> > Sometimes I see myself writing one line if-elses like `if x<0 x=-x end`, 
> which I think is not very "readable". 
> > 
> > What is your advice for that? 
> > "That is ok", "always put a semicolon after the condition" or "totally 
> avoid one liners"? 
> > 
> > BTW, have you Julia devs ever considered introducing a "then" keyword 
> which could optionally be placed after the condition (à la Ruby)? 
> > `if x<0 then x=-x end` seems much more readable. 
> > 
> > (I know the ternary operator, but I'm considering cases where no "else" 
> action exists.) 
> > 
>
>

Reply via email to