Re: We know what you need, and we'll push it down your throat.

[prev] [thread] [next] [lurker] [Date index for 2006/12/22]

From: Abigail
Subject: Re: We know what you need, and we'll push it down your throat.
Date: 16:34 on 22 Dec 2006
--PY8tzLeNxmyMVNR3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Dec 22, 2006 at 05:18:45PM +0100, Juerd wrote:
> H.Merijn Brand skribis 2006-12-22 16:03 (+0100):
> > > In Perl6:
> > >     print sqrt(9) + 7;  # Prints 10.
> > >     print sqrt (9) + 7; # Prints  4.
> > I know something was going to change, but to make a language unusable?
>=20
> The parens for sqrt(9) are a post-circum-fix operator in Perl6.

A *what*?

> Postcircumfix operators cannot be preceded by whitespace.

If you say so. I bet there's also a deeper reason - Larry doesn't seem
to be the person to make arbitrary decisions to make life more difficult
just for the sake of it.

> I think that's pretty usable. Not because it's what everyone has always
> been used to, but because it is consistent within this language.
>=20
> A postcircumfix operator may also be used with method-like syntax, using
> a dot:
>=20
>     print sqrt.(9) + 7;   # Prints 10.
>=20
> And if you really must use whitespace (for example, a newline
> character), you can explicitly escape it, but only if you use the
> dot-notation:
>=20
>     print sqrt\
>     .(9) + 7;             # Prints 10.
>=20
>     print sqrt\ .(9) + 7; # Prints 10.
>=20
> This syntax is ugly and should be used in emergencies only.
>=20
> > Well, if above is true, perl6 has lost me too. Forever.
>=20
> Or you could write a grammar that suits your programming style better.

Pointless argument. If it were that easy to tweak the grammar, the
whitespace would have been optional in the first place. You will NOT be
able to change the grammar easily (not because the syntax of changing
the grammar is necessarily difficult, but because the Perl6 grammar is
extremely complex, and changing one thing will have to mean a ton of
other things have to change as well.  Perl6 ain't Forth nor Lisp).

Besides, noone is interested in having a language were each coder
creates his/her own (incompatible) dialect.

> But the following set of wishes clashes heavily:
>=20
> - () can be used for grouping (to override precedence)
> - () can be used to enclose subroutine arguments
> - subroutines can also be used without ()

Perl5 had no problem coping with those rules (and it also uses ()
for clauses in if, while, etc, has optional () on the left hand side
of x, uses () around prototypes, etc), and it can all do that without
syntactically significant whitespace.=20

It doesn't need post-circum-fix operators though. It just has subroutines
that take lists as arguments, and uses () for precedence (in the case of
calling subroutines).

> The solution is to use heuristics, that cause inconsistencies all over
> the language. We'd all love that, right? :)
>=20
> > A function should in my vision *always* be separated from it's paren wi=
th a
> > space.
>=20
> My vision is that it should never, but let's not discuss this. Won't get
> any of us anyware.
>=20
> You are right that Perl 6 is less friendly (you could say hostile) for
> people with different whitespace styles than Perl 5 was.

Yep. Were one of the features of Perl1 to Perl5 was the fact that people
coming from different schools would feel welcome, Perl6 takes a dramatic
steps and is outright hostile towards those not coding according to the
standards set by the cabal.

HATE. HATE. HATE.



Abigail

--PY8tzLeNxmyMVNR3
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFFjAkiBOh7Ggo6rasRAg5CAKCY9MyZ7v8ng/hrBFEN/YTgFf7/EACfdDqP
O2cm6onCfeSN9WykuxQbImo=
=2i2F
-----END PGP SIGNATURE-----

--PY8tzLeNxmyMVNR3--
There's stuff above here

Generated at 03:02 on 01 Jan 2007 by mariachi 0.52