Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^2: What operator should perl5porters use for safe dereferencing?

by Anonymous Monk
on Jun 04, 2012 at 04:51 UTC ( #974223=note: print w/replies, xml ) Need Help??

in reply to Re: What operator should perl5porters use for safe dereferencing?
in thread What operator should perl5porters use for safe dereferencing?

~> is less characters, but is more travel. I like ->> because it's the same input as -> but with the last character repeated.

~> also looks too similar to -> on some fonts at a glance, so ->> has the advantage of being shaped differently. Of course it does have the disadvantage that a junior might think it's a typo and 'fix' it.

Replies are listed 'Best First'.
Re^3: What operator should perl5porters use for safe dereferencing?
by cavac (Deacon) on Jun 17, 2012 at 18:23 UTC

    I agree,
    ~> and
    -> are just too similar.

    Depending on the font (and you can not always choose the one you like, especially online), you really have to look hard. I pretty much guarantee that code audits as well as helping out on SoPW will get a lot harder.

    As for the typing effort, a character more or less really doesn't matter. Those of us who use non-english keyboards (so, most of us really) already have a hard time coding Perl and other programming languages. Some examples from my german keyboard:

    • ~ is (Alt Gr)(+)
    • \ is (Alt Gr)(ß)
    • { is (Alt Gr)(7)
    • [ is (Alt Gr)(8)

    In effect, a lot of the "standard" metacharacters require awkward right-hand-only acrobatics. I thought about using an english/american keyboard, but since i also require german umlauts that would just shift the problem. Just changing the keyboard layout in software is also a bit awkward, since then the printing on the keys does not match what i type (which i find rather confusing).

    In short, i don't care if i have to type two or three characters, since something like ?-> is easier to read and harder to overlook (and in this case actually easier to type on my german keyboard as well).

    And, from my personal view, i always associate ~ operations with some kind of regular expression stuff, whereas ? does not.

    "You have reached the Monastery. All our helpdesk monks are busy at the moment. Please press "1" to instantly donate 10 currency units for a good cause or press "2" to hang up. Or you can dial "12" to get connected directly to second level support."

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://974223]
[kcott]: marioroy, not much to go on. Searching "slow logging" (by me) produces no results; just "slow" gives a screenful. Perhaps, "Searching large files a block at a time" which had a performance aspect and you had some imput also.
[gnosti]: Hi, Looking for a module that can add HH:MM:SS durations like 1:40, 1:00:24.13 and 12.3? I see on CPAN more modules with absolute dates. TIA
[kcott]: s/imput/input/
[Corion]: DateTime::Duration ? Personally,I convert stuff to seconds using Time::Piece or Time::Local and then add the seconds and then use POSIX::strftime to print them as hours again
[marto]: good morning all, TCIF
[gnosti]: I'm reading from ffmpeg lengths of video clips in H:M:S and needing to add them and format them back to H:M:S for feeding back to ffmpeg

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2017-08-18 08:53 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (297 votes). Check out past polls.