Re:I've been designing a language since 2009 – friends and I...
by levodelellis on Sunday August 14, 2022 @01:12PM
(#32460942)
Comparing perl to a language that wants to be readable is very funny to me
For me, the problem is when my expression got long or if I call a function with multiple parameters. The more complex the line is the easier it is to not notice the `if`. Also I agree with what the other person said, it doesn't match the order if you read top down left to right
Re:I've been designing a language since 2009 – friends and I...
by unfunco on Sunday August 14, 2022 @01:53PM
(#32461324)
Ruby also has it and it is easily readable.
Re:I've been designing a language since 2009 – friends and I...
by forgotmypw17 on Sunday August 14, 2022 @12:39PM
(#32460636)
What I find confusing about it is that it does not match the execution order.
Perl is my main, and I never use that feature.
Re:I've been designing a language since 2009 – friends and I...
by jbverschoor on Sunday August 14, 2022 @05:43PM
(#32463241)
It’s way more clear and robust than a one liner if.
A for loop also doesn’t match what’s being executed. It’s s actually a do/while loop
Re:I've been designing a language since 2009 – friends and I...
by forgotmypw17 on Sunday August 14, 2022 @06:24PM
(#32463619)
One-liner if statements is another pattern I stay away from as much as possible...
Re:I've been designing a language since 2009 – friends and I...
by jbverschoor on Sunday August 14, 2022 @10:20PM
(#32465177)
I usually use it to do some pre conditional checks, or to return early
Re:I've been designing a language since 2009 – friends and I...
by forgotmypw17 on Monday August 15, 2022 @05:58AM
(#32467748)
That's fair. I still use 3-liners for that.
What's confusing about that? Perl has that, I use it all the time.