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: H.Merijn Brand
Subject: Re: We know what you need, and we'll push it down your throat.
Date: 16:29 on 22 Dec 2006
On Fri, 22 Dec 2006 17:18:45 +0100, Juerd <juerd@xxxxxxxxxxx.xx> 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?
> 
> The parens for sqrt(9) are a post-circum-fix operator in Perl6.
> Postcircumfix operators cannot be preceded by whitespace.
> 
> I think that's pretty usable.

Keep on dreaming. It'll break every single script I ever wrote and will write.
It's like telling me that in order to have my car drive on the correct side
of the road, I have to sit on the backseat of my car.

> Not because it's what everyone has always been used to,

I, nor the guys I programmed with on high-school, not my colleages fall in
this group. I've always known I am not everyone, but to rule me (and all that
think like me in this respect) out to be able to drop parens on if statements
is ridiculous.

> but because it is consistent within this language.

So were the spaces in cobol and so are they in python.
I'll stick with perl5. Is is an absolute show stopper for me.
And I am not kidding.

> A postcircumfix operator may also be used with method-like syntax, using
> a dot:
> 
>     print sqrt.(9) + 7;   # Prints 10.

Ugly. Should be a space

> 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:
> 
>     print sqrt\
>     .(9) + 7;             # Prints 10.

Makes me laugh.

>     print sqrt\ .(9) + 7; # Prints 10.
> 
> This syntax is ugly and should be used in emergencies only.

So is sqrt( 9 )

> > Well, if above is true, perl6 has lost me too. Forever.
> 
> Or you could write a grammar that suits your programming style better.
> But the following set of wishes clashes heavily:

That could win me back, but it should be in the core, and be *very* easily
switched to default.

> - () can be used for grouping (to override precedence)
> - () can be used to enclose subroutine arguments
> - subroutines can also be used without ()
> 
> The solution is to use heuristics, that cause inconsistencies all over
> the language. We'd all love that, right? :)

No. TIMTOWTDI

> > A function should in my vision *always* be separated from it's paren with a
> > space.
> 
> My vision is that it should never, but let's not discuss this. Won't get
> any of us anyware.

Exactly. And perl(5) has always left us free in choosing style and layout.
FWIW So has C in many aspects

> You are right that Perl 6 is less friendly (you could say hostile) for
> people with different whitespace styles than Perl 5 was.

Block mode on ...

> I personally think the syntax with a dot is very nice and clear. But if
> you insist on using whitespace, not a dot, the default Perl 6 is
> certainly hateful for you.

HATE HATE HATE !

-- 
H.Merijn Brand         Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.9.x   on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.0 & 10.1, AIX 4.3 & 5.2, and Cygwin. http://qa.perl.org
http://mirrors.develooper.com/hpux/            http://www.test-smoke.org
                        http://www.goldmark.org/jeff/stupid-disclaimers/
There's stuff above here

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