Variable Naming [was Re: [Israel.pm] catching $a, $b unnecessary my and maybe other things]

Shlomi Fish shlomif at iglu.org.il
Mon Jun 7 22:43:03 PDT 2004


On Monday 07 June 2004 23:14, Yuval Yaari wrote:
> Mikhael Goikhman said:
> > On 07 Jun 2004 09:19:47 +0300, Yuval Yaari wrote:
> >> Not getting into editor wars, but this is so basic, I guess even
> >> notepad.exe should have this feature.
> >
> > I doubt there is an editor that even colorizes (or otherwise parses)
> > Perl code correctly in all non-trivial cases.
>
> True. But they do a damn good job anyway! :)
> Usually they fall for __END__ and __DATA__ or POD or weird things like
> that. I think the main 2 linux editors, emacs and vim (sorry if I'm wrong,
> I'm not trying to piss anyone who uses any editor) work well with these
> things.
>

Just for the record, if you try to open many Perl Golf entries (usually the 
leading hyper-regex ones), you'll see that a great deal of them are not 
highlighted correctly by vim.

http://terje2.perlgolf.org/

I also recall that when hacking on Yapcom, I found out that a particular 
string delimiter confused vim, and sent a patch to resolve it. It was 
rejected on the claim that I should fix it in vim, and not in the Perl code. 
(which naturally was not as easy for me because I don't grok vim scripting 
and its syntax highlighting logic very well).

Many times when editing files in gvim, I have to purposely structure my 
syntax, and chose appropriate delimiters for it to color it correctly. I 
sometimes also use "@$hello" instead of "@{$hello}" because the first one is 
highlighted and the other one isn't.

People say about TeX (the typesetting system by Don Knuth and others) that 
"The only thing that can understand TeX is TeX.". I'm not sure if the 
situation is as bad in Perl, but it's pretty close. The Perl syntax and 
grammar are pretty funky. (but we love it anyway!)

Regards,

	Shlomi Fish
-- 

---------------------------------------------------------------------
Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://shlomif.il.eu.org/

Quidquid latine dictum sit, altum viditur.
        [Whatever is said in Latin sounds profound.]



More information about the Perl mailing list