develooper Front page | perl.perl5.porters | Postings from June 2021

Re: RFC: define meta operator

Thread Previous
June 13, 2021 10:36
Re: RFC: define meta operator
Message ID:
On Sat, 12 Jun 2021 at 22:44, Leon Timmermans <> wrote:

> Frankly this looks to me like it isn't Perl anymore. None of it is
> intuitive to me.
> Leon

ad "Perl anymore"

What is in fact Perl ?

True, this is RFC is not Perl, it is a proposal to improve it.
Proposed syntax is chosen

- to be readable
  It let important parts (symbol name and what kind of symbol it is) always
be at same place followed by optional parts.
  So when you look at line (or grep) you will always see "sub X", "package
Y", "my/local/has $z" first.
  When you read a code, you navigates through symbol. It should express
intention why it exists.
  When you expect fulfilled intention, you don't care about implementation
- same reason people usually use provided `sort`
  instead of implementing it.

  For same reason RFC contains usage of `not` for boolean parameters.

- to be available syntax
  usage of new operator is compromise between capabilities of current
grammar and new requirements.
  Token ':=' cannot appear as valid syntax token in current code, so it can
have it's own rules (eg: reusing keyword `not`)
  Same reason is for using ':' as a property name sigil (I didn't use word
adverb because LeoNerd use it quite often on IRC
  so I'd rather avoid possible confusion at least here).

  So syntax can be implemented using current perly.y and toke.c (one change
- fat comma has to be token on its own)

ad "not intuitive"

That's probably related to either my incapabilities to express myself as
well as lack of bigger picture - this RFC is first
of few more planned towards native support of context oriented programming
in perl.

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About