Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

the old new safe dereference operator

 

 

First page Previous page 1 2 3 4 Next page Last page  View All Perl porters RSS feed   Index | Next | Previous | View Threaded


albie at alfarrabio

May 31, 2012, 12:57 PM

Post #76 of 80 (123 views)
Permalink
Re: the old new safe dereference operator [In reply to]

On 31/05/12 20:38, Joaquin Ferrero wrote:
> El 31/05/12 19:39, Johan Vromans escribió:
>> Abigail<abigail [at] abigail> writes:
>>
>>> ~> looks weird in the sense that it just doesn't look like anything.
>>> Certainly not any kind of arrow.
>>
>> Let's use ⇢ or ⇝ instead.
>>
>> Funny that after more than 10 years trying to move into the 21st century
>> ASCII still dominates the mind.
>>
>> And there are many more arrows available…
>>
>> -- Johan
>>
>
> The limit is imposed by the keyboards...
> but it seem not problem for APL programmers:
>
> https://en.wikipedia.org/wiki/APL_%28codepage%29#Keyboard_layout
>

I am sorry to disagree. ~> looks a lot with a spermatozoid...


philippe.bruhat at free

May 31, 2012, 4:35 PM

Post #77 of 80 (121 views)
Permalink
Re: the old new safe dereference operator [In reply to]

On Thu, May 31, 2012 at 08:57:27PM +0100, Alberto Manuel Brando Simes wrote:
>
> I am sorry to disagree. ~> looks a lot with a spermatozoid...

Methinks ~~<> looks more like one. ;-)

By the way, I removed the words "sperm" and "goatse" from perlsecret.pod
(or rather, hid them well enough that I don't think anyone can find them
if not specifically looking for them).

--
Philippe Bruhat (BooK)

He who revels in being bigger forgets that he is the larger target.
(Moral from Groo #5 (Image))


jvromans at squirrel

Jun 1, 2012, 12:16 AM

Post #78 of 80 (123 views)
Permalink
Re: the old new safe dereference operator [In reply to]

Joaquin Ferrero <explorer [at] joaquinferrero> writes:

> The limit is imposed by the keyboards...

Hardly.

For ->, you need two keystrokes.
For ⇝, you need three (provided your compose settings are appropriate).

Being a native speaker if a non-ASCII language, I'm very familiar with
using the compose key.

PS: The keyboard argument becomes even more important with modern mobile
devices that do not even have a keyboard.

-- Johan


h.m.brand at xs4all

Jun 1, 2012, 1:06 AM

Post #79 of 80 (122 views)
Permalink
Re: the old new safe dereference operator [In reply to]

On Fri, 01 Jun 2012 09:16:14 +0200, Johan Vromans
<jvromans [at] squirrel> wrote:

> Joaquin Ferrero <explorer [at] joaquinferrero> writes:
>
> > The limit is imposed by the keyboards...
>
> Hardly.
>
> For ->, you need two keystrokes.
> For ⇝, you need three (provided your compose settings are appropriate).
>
> Being a native speaker if a non-ASCII language, I'm very familiar with
> using the compose key.
>
> PS: The keyboard argument becomes even more important with modern mobile
> devices that do not even have a keyboard.

or with "editors" that impose a character set that does not support
UTF-8 or whatever set is used to "enter" or display the arrow(s).

Of course it would be silly to use characters added recently in
Unicode-6, like 01f51c SOON WITH RIGHTWARDS ARROW ABOVE (however
inappropriate), but extending to iso-8859-1 (0x80-0xff) could be
useful as it already supports « and » which most if not all editors
and fonts should support this day and age.

$obj÷>method ()

looks nice too :) ☺

--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.14 porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/


h.m.brand at xs4all

Jun 1, 2012, 1:08 AM

Post #80 of 80 (123 views)
Permalink
Re: the old new safe dereference operator [In reply to]

On Thu, 31 May 2012 16:26:22 +0100, Nicholas Clark <nick [at] ccl4>
wrote:

For those not following the discussion on PerlMonks, *this* reply from
Tye is worth reading:

http://www.perlmonks.org/?node_id=973680

> So, current "issues" are threefold?
>
> On Wed, May 30, 2012 at 12:05:16PM +0200, Philippe Bruhat (BooK) wrote:
> > On Thu, May 24, 2012 at 09:51:16PM -0400, Ricardo Signes wrote:
> > >
> > > Hey, who else remembers $xyz->{foo}?->{bar}?
>
> 0: What's actually the best spelling? For type-ability, readability, and
> guess-ability.
>
> 1: This one:
>
> > What about implicit dereference?
> >
> > I think the option that makes more sense is for implicit dereference to
> > be performed using the last explicit dereference operator.
> >
> > So,
> >
> > $xyz?->{foo}{bar} # both safe
> >
> > $xyz->{foo}{bar} # both regular
> >
> > This makes it easy to switch in the middle of an expression,
> > while not annoyingly verbose:
> >
> > $xyz->{foo}?->{bar}{baz} # regular, and then all safe
> >
> > The dereference operator needs to explicit around method and
> > subroutine calls, anyway.
>
> 2: What does it mean in the context of an LVALUE construction?
>
> eg what does this do:
>
> ++$a?->b();
>
>
> a) skip the entire statement if $a is undef
>
> b) generate a runtime error if $a is undef, much like this does:
>
> $ perl -wle '${\undef}++'
> Modification of a read-only value attempted at -e line 1.
>
> c) fail at compile time (for now) - simply restrict the use safe
> dereference within LVALUE expressions, as it's a trap.
>
> d) something else
>
>
> and I agree with Ricardo - the best way to resolve this seem to be a patch
> on a branch.
>
> Nicholas Clark


--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.14 porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/

First page Previous page 1 2 3 4 Next page Last page  View All Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.