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

Re: Announcing Perl 7

Thread Previous | Thread Next
Paul "LeoNerd" Evans
June 27, 2020 16:40
Re: Announcing Perl 7
Message ID:
On Sat, 27 Jun 2020 12:18:30 +0100
"Paul \"LeoNerd\" Evans" <> wrote:

> Plus a "use v7" at the top of a file will be a BIG HINT to things like
> Github syntax highlighting, vim/emacs/other editors and IDEs ... so
> many places, that they should pick syntax highlighting relevant to
> Perl 7, not Perl 5.
> Alright right now I am in quite a mixed place, trying to have vim
> support both signatures and pre-signature prototype notations. It
> would be alot easier if vim had a standard signal to look for, to
> tell it *which* set of two different kinds of syntax rules to apply
> to *.pm files.
>   use v7;
> would be a very easy signal to look for.
> I can imagine the github/ highlighters would also appreciate
> such a useful signal.

In fact, there is already precedent for this. Right now, vim uses the
presence of the word "bash" on the shebang line of a .sh file to work
out if we're expecting to run the script in bash, or just any POSIX
shell. Based on that, its highlight rules can show you big red error
markers where you are using bash'isms in a plain /bin/sh script. See
attached images.

I would love to have similar for Perl scripts, to highlight big red
error markers if I try to write syntax that isn't valid in v7 any more.

  use v7;

would allow that and give vim/emacs/other IDE users some lovely
highlighting to guide them into writing the proper syntax, which they
wouldn't be able to do without it.

Paul "LeoNerd" Evans      |  |

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