in reply to Re^2: Syntax Highlighting Editors Beware
in thread Syntax Highlighting Editors Beware

if we could have variable names $with spaces in them = 1

What about printing that variable in an interpolated string, and confusion with a variable named $with?

my $with = 2; my $with spaces in them = 4; print "$with spaces in them\n";

I know in Perl/Gtk2 there is some confusion with signal and property names with - in them, but it's resolved by automatically converting them to underscores.

’key-press-mask’ and ’key_press_mask’
are interpreted as the same thing.

I think a space should be a space, and not have any sort of hidden connector usage, what's wrong with underscores? Yeah, that reminds me of tabs and Python.....yuck.


I'm not really a human, but I play one on earth Remember How Lucky You Are

Replies are listed 'Best First'.
Re^4: Syntax Highlighting Editors Beware
by BrowserUk (Patriarch) on Aug 09, 2008 at 18:13 UTC

    Ah! Now you thought about that for more than my recommended 30 seconds didn't you?

    After another 30 seconds of deep meditation I divine that the obvious thing to do is disambiguate them in usual way. Just quote them!


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Then you bring up the problem of multiple nested quotes when you mix vars_with_spaces and constants
      my $with = 2; my $with spaces in them = 4; #which is more readable? print "$with spaces in them "$with spaces in them"\n"; #or print "$with spaces in them $with_spaces_in_them\n";
      You will never convince me that spaces in variable names makes things better. Microsoft's mistake number 1 was \r\n as a linefeed, mistake number 2 was spaces in variables and filenames.

      I'm not really a human, but I play one on earth Remember How Lucky You Are