RE: Allowing '-' in identifiers: what's the motivation?

2008-08-12 Thread Michael Mangelsdorf
 
Dear Thomas,

Is this supposed to be a joke
Absolutely not. What I was trying to say is that there seems
to be a trend to consider very relaxed identifier rules a good thing.

If Perl 6 wants to grab the road for 20 years, then perhaps
this issue is more serious (this is why I quoted you in particular)
than is obvious, because just as has been pointed out,
relaxed identifiers could become what programmers actually expect.

I also tried to say that as special characters (not 7-bit ASCII)
like for hyper ops have already been admitted, the question of just how
far ($foobar) this admission should (be allowed to) is just around
the corner.

When I look at Windows Powershell (dashes everywhere) or XML, where
identifiers literally have to be tagged so we know what they mean,
I can't say it's very pretty.

I'm just interested in where the balance in all this will be.

Apologies, Thom, for being imprecise and seemingly antagonizing.

 
Kindly,
Michael


-Original Message-
From: TSa [mailto:[EMAIL PROTECTED] 
Sent: Dienstag, 12. August 2008 09:25
To: perl6-language@perl.org
Subject: Re: Allowing '-' in identifiers: what's the motivation?

HaloO,

Michael Mangelsdorf wrote:
 Actually I can even imagine allowing almost all chars
 in the middle of identifiers.
 
 Is this a trend we should extrapolate into the lifetime scope
 of the Perl 6 language?
 How far are we in this process, given Unicode guillemets for hyper ops?

Is this supposed to be a joke or a serious contribution to the
discussion? Mine was serious in the sense that I consider the
enforcement of whitespace for infix ops a good thing or at least
not a bad side-effect. What's so different in $foo-bar versus
$foo*bar, $foo+bar or $foo/bar? The latter might e.g. indicate
path variables. Or imagine a coding convention where junctive
variables bear their generating operator: $foo|bar, $foobar and
$foo^bar.


Regards, TSa.
-- 

The unavoidable price of reliability is simplicity -- C.A.R. Hoare
Simplicity does not precede complexity, but follows it. -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan



RE: Allowing '-' in identifiers: what's the motivation?

2008-08-11 Thread Michael Mangelsdorf

Actually I can even imagine allowing almost all chars
in the middle of identifiers.

Is this a trend we should extrapolate into the lifetime scope
of the Perl 6 language?
How far are we in this process, given Unicode guillemets for hyper ops?

 
Kindly,
Michael

-Original Message-
From: TSa (Thomas Sandlaß) [mailto:[EMAIL PROTECTED] 
Sent: Montag, 11. August 2008 19:55
To: perl6-language@perl.org
Subject: Re: Allowing '-' in identifiers: what's the motivation?

On Monday, 11. August 2008 05:35:03 John M. Dlugosz wrote:
 E.g. see http://www.perlmonks.org/?node_id=703265 :

 sub bar {
  return 100;
 }
 sub foo { 50;}
 sub foo-bar {
return  rand(50);
}
 if (foo - bar != foo-bar) {
print Haha!\n;
 }

Actually I can even imagine allowing almost all chars
in the middle of identifiers. The price is that *all*
infix operators need spaces. This seems to be the trend
right now. See e.g. the disambiguation of meta reduce
and array constructors or adverbs versus nouns in the
call syntax.

So, how simple would a tokenizer become when whitespace
separates almost all tokens? Noteable exceptions would be
the pre- and postfix operators.


Regards, TSa.
-- 
The unavoidable price of reliability is simplicity -- C.A.R. Hoare
Simplicity does not precede complexity, but follows it. -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan