On Sat, Feb 17, 2024 at 6:12?PM Leon Timmermans <fawaka@gmail.com> wrote:
>
>> How feasible would be to make if's parens optional?, ie, to allow
>>
>> if 4 > 2 { say 'true' }
>>
>
>
The challenge with that is not parsing the condition per se, but its end.
> Take for example «if 4 > a { boo }», what does that even mean? That all
> depends on the prototype of sub a. There's some subtle ambiguity with
> making parentheses optional. That doesn't mean it isn't possible at all,
> but it isn't without issues.
>
You've touched on an issue that
https://metacpan.org/pod/standard could
address. While I understand the module might not be everyone's cup of tea,
I see it as a bridge to a more dynamic and robust Perl, without sacrificing
the essence that makes Perl unique to us.
This module ensures Perl aligns with "Standard Perl," offering a version
that is statically parseable when no warnings are detected. What's
beautiful about this is it maintains backwards-compatibility while opening
the door to numerous enhancements. Imagine a Perl where:
- Tooling support surpasses our expectations, facilitating a smoother
coding journey.
- IDE integration is much, much easier!
- Security can be improved, thanks to improved tooling.
- Macros become a seamless part of our toolbox, enhancing our coding
efficiency.
- The learning curve is more welcoming to newcomers.
I love Perl's flexibility and its unique character. This is not about
changing the heart of Perl or our community but about enriching it, making
it a language both for current and future developers.
Currently, it uses Marpa, so that's something that would have to be
addressed, but aside from that, we have a whole host of improvements which
could be realized if we were brave enough!
Best,
Ovid