in reply to Emacs CPerl mode electric parentheses: get extra space in there?

That is, I want extra space around whatever I put in the parens
Let me be the first to say "ick." I've never understood this coding style, since it goes against spacing conventions for normal text.
  • Comment on Re: Emacs CPerl mode electric parentheses: get extra space in there?

Replies are listed 'Best First'.
Re^2: Emacs CPerl mode electric parentheses: get extra space in there?
by Anonymous Monk on Jul 01, 2008 at 19:19 UTC
    Let me be the first to say "ick."

    You're the first! ;)

    By the way, I don't like the extra spaces everywhere. For example, "$foo{bar}" and "$baz[1]" need no extra spaces. However, things like "if ( -e $file ) ..." look better to me with that extra space. More visual separatation I guess.

      To me, it's uber-yuck on the level of putting spaces *before* commas. That said, I should also say something useful: download snippet.el. It's much better than cperl's electric mode, with a simple syntax to defined your own abbreviations, e.g. here.
Re^2: Emacs CPerl mode electric parentheses: get extra space in there?
by Your Mother (Archbishop) on Jul 03, 2008 at 19:53 UTC
    it goes against spacing conventions for normal text

    I completely agree which is why I capitalize "My" and end all my statements with periods instead of semi-colons and all my sub and method calls with question marks and I use proper left and right double quotes with all my arguments to file handles and such. :)

      *sigh* This is yet another example of why I hate talking to (fellow) programmers: pointless pedantry. Some syntax is required by a programming language; some is optional. I prefer that the optional stuff follow normal language conventions (i.e. those of written English; yes, I know it may not be your first language, but it's the language of the keywords in your programming language).

        I wasn't being pedantic, I was trying to be funny and pointing out that your preference was personal and at least somewhat arbitrary. I'm sure you don't, for example, use "spacing conventions for normal text" in regards to indentation even though it is also optional. I don't think there is anything wrong with personal style differences, I don't even think it's "icky," it's just that *sigh* justifying the arbitrary with selective rationale inspires snark.