Re: syntax-variants, RPN (was: Re: $_ defaulting for mutating ops)

2005-11-03 Thread Michele Dondi

On Wed, 2 Nov 2005, Ruud H.G. van Tol wrote:


http://www.nntp.perl.org/group/perl.perl6.language/17556


I understand that Perl6 allows blocks with changed/enhanced syntax, so
it is or will become possible (to add it) as if it was in the core
language.
Do I understand that right? Something as simple as a 'use RPN' in a
block? (assuming that someone created such an RPN-pre-processor
or -compiler)


Indeed this is what that we all know. Of course the possibility of doing 
so will depend on the possiblity of building up suitable RPN syntax 
consistent with the rest of the syntax.



Michele
--
E' molto piu' facile affrontare il lutto, il disonore e la perdita della
propria anima - che questo tipo di fame prolungata.
- Joseph Conrad, Cuore di Tenebra.


Re: syntax-variants, RPN (was: Re: $_ defaulting for mutating ops)

2005-11-03 Thread Rob Kinyon
On 11/3/05, Michele Dondi [EMAIL PROTECTED] wrote:
 On Wed, 2 Nov 2005, Ruud H.G. van Tol wrote:

  http://www.nntp.perl.org/group/perl.perl6.language/17556
 
  I understand that Perl6 allows blocks with changed/enhanced syntax, so
  it is or will become possible (to add it) as if it was in the core
  language.
  Do I understand that right? Something as simple as a 'use RPN' in a
  block? (assuming that someone created such an RPN-pre-processor
  or -compiler)

 Indeed this is what that we all know. Of course the possibility of doing
 so will depend on the possiblity of building up suitable RPN syntax
 consistent with the rest of the syntax.

If Perl6 is parseable by Perl6, then wouldn't you be able to
completely throw out the default Perl6 syntax and create your own,
completely unrelated syntax? I don't know ... maybe you have PGE::Ruby
that would throw out the P6 grammar and give you Ruby's grammar within
the block. Then, it's just a matter of describing what PGE::RPN does -
what it adds, what it removes, and what it modifies.

In my opinion, if you use a grammar extension, ALL bets are off within
that scope until you've read the documentation. Literally anything and
everything can happen, if the author deemed it so. It's a source
filter-like construct that doesn't suck because source filter-like
constructs are part of the spec.

Rob


syntax-variants, RPN (was: Re: $_ defaulting for mutating ops)

2005-11-02 Thread Ruud H.G. van Tol
Michele Dondi:
 Ruud H.G. van Tol:

 Or RPN-like:

  $x #= 2* 1+ 3/;

 Being a big fan of RPN myself (and considering it quite natural), I'd
 appreciate very much such a feature. I had asked myself about RPN
 features in P6, albeit in a probably unreasonable fashion:

 http://www.nntp.perl.org/group/perl.perl6.language/17556

I understand that Perl6 allows blocks with changed/enhanced syntax, so
it is or will become possible (to add it) as if it was in the core
language.
Do I understand that right? Something as simple as a 'use RPN' in a
block? (assuming that someone created such an RPN-pre-processor
or -compiler)

-- 
Grtz, Ruud