Re: Significant whitespace (was Re: Blogging sucks)

[prev] [thread] [next] [lurker] [Date index for 2005/10/16]

From: Abigail
Subject: Re: Significant whitespace (was Re: Blogging sucks)
Date: 22:51 on 16 Oct 2005
--Xb8pJpF45Qg/t7GZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Oct 16, 2005 at 11:11:45PM +0200, A. Pagaltzis wrote:
> * Abigail <abigail@xxxxxxx.xx> [2005-10-14 10:10]:
> > Someone pointed out that I was incorrect. It turns out to be
> > _worse_:
> >=20
> >       my %hash;                        # Empty hash.
> >       if %hash{1} {print "Found it"}   # No output.
> >       if %hash {1} {print "Found it"}  # Syntax error.
> >       if %hash {1}
> >       {print "Found it"}               # Prints 'Found it'.
>=20
> That???s really just obfuscation based on expectations from Perl5.

And C. And Python. And Java. And Pascal. And about almost every language
on the sun that allows whitespace between an aggregate and its indexing
operator.

> Once you know that there must be no whitespace between the hash
> name and the key lookup operator in Perl6, the parsing is
> completely straightforward.

"Once you know". That's the point. "Once you know" all the behaviour of
software, no software is hateful. It's just a matter of knowing it. Once.

I hate Perl6 not because I don't know the rules, I hate Perl6 because
it robs me of a coding style I've used for the past 20 years, in any langua=
ge
I've used. Switching to Perl6 seems less logical than switching to Windows.

> Of course, you are free to dislike that syntax rule.
>=20
> Can you throw in whitespace in those examples if you use the new
> %hash??key?? syntax instead?

Question marks? No idea to which syntax you are referring.

> (And if not, would it at least be possible to parse the examples
> umambiguously if it *were* allowed? If the answer to that
> question is yes, then I would lobby for dropping the {} hash
> lookup operator altogether and permitting whitespace with the ????
> operator.)

I've heard about the ??:: operator, replacing the ?: one. But ????, no idea.



Abigail

--Xb8pJpF45Qg/t7GZ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFDUstrBOh7Ggo6rasRAkD0AKClY6cJO2gWrttDFz70OzbD9FbUhgCggy9l
oy5grhxlv1zVmmccFtixx1U=
=AacV
-----END PGP SIGNATURE-----

--Xb8pJpF45Qg/t7GZ--

Generated at 20:00 on 17 Oct 2005 by mariachi 0.52