Front page | perl.perl5.porters |
Postings from June 2020
Re: Announcing Perl 7
Thread Previous
|
Thread Next
From:
Paul "LeoNerd" Evans
Date:
June 27, 2020 16:40
Subject:
Re: Announcing Perl 7
Message ID:
20200627174014.73724fb0@shy.leonerd.org.uk
On Sat, 27 Jun 2020 12:18:30 +0100
"Paul \"LeoNerd\" Evans" <leonerd@leonerd.org.uk> 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/et.al. 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
leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
Thread Previous
|
Thread Next