Re: [perl #42769] Names of basic PMC serve as keywords in PIR

2007-09-10 Thread Patrick R. Michaud
On Sun, Sep 09, 2007 at 10:38:11AM -0700, Bernhard Schmalhofer via RT wrote:
 On So. 29. Apr. 2007, 06:01:16, kjs wrote:
 
 In r21167 the keyword 'object', as a synonym of 'pmc', was removed from
 PIR. 
 However the question from kjs remains to be answered:
 
  related to this, I think that imcc also allows for built-in types as
  types.
  such as .local Array a etc. (sorry can't check; don't have my own pc
  around here, this is a public pc) (I added some notes about this and other
  PIR cleanups in languages/PIR and I think also in compilers/pirc IIRC).
  
  IMHO, this is not needed; pmc is sufficient, and it'd be nice to
  keep PIR
  as simple as possible, after all it's an intermediate language. Moreover,
  everytime a built-in type is added (although not happening that often) the
  grammar would have to be updated to stay consistent.
 
 I second the suggestion from kjs. It isn't helpful to be able to say:
 
   .local Array my_string
   my_string = new String

In fact, I think many PIR programmers will find this confusing.

Let's stick with 'pmc' for now -- we can extend it later if need be.

Pm


Re: [perl #42769] Names of basic PMC serve as keywords in PIR

2007-09-10 Thread Bernhard Schmalhofer

Patrick R. Michaud schrieb:

related to this, I think that imcc also allows for built-in types as
types.
such as .local Array a etc. (sorry can't check; don't have my own pc
around here, this is a public pc) (I added some notes about this and other
PIR cleanups in languages/PIR and I think also in compilers/pirc IIRC).

  

In fact, I think many PIR programmers will find this confusing.

Let's stick with 'pmc' for now -- we can extend it later if need be.
  
The question is not whether this feature should be added, but whether it 
should be

first deprecated and then removed.
Currently

.sub main :main

 .local Array my_string

 my_string = new String

 my_string = 'hello'

 say my_string

.end

is valid PIR.



Regards,

 Bernhard




Re: [perl #42769] Names of basic PMC serve as keywords in PIR

2007-09-10 Thread Patrick R. Michaud
On Mon, Sep 10, 2007 at 07:47:58PM +0200, Bernhard Schmalhofer wrote:
 Patrick R. Michaud schrieb:
 related to this, I think that imcc also allows for built-in types as
 types.
 such as .local Array a etc. (sorry can't check; don't have my own pc
 around here, this is a public pc) (I added some notes about this and 
 other
 PIR cleanups in languages/PIR and I think also in compilers/pirc IIRC).
 
   
 In fact, I think many PIR programmers will find this confusing.
 
 Let's stick with 'pmc' for now -- we can extend it later if need be.
   
 The question is not whether this feature should be added, but whether it 
 should be first deprecated and then removed.

Yes, I understand this.  I'm saying that even though 
.local Array mystring is currently allowed, AFAIK there aren't
any PIR programs that use this.  Thus I'm saying we should stick with
only using .local pmc ..., and deprecate/remove .local Array ...
to prevent others from being confused if they ever see it in a PIR
program.

Pm


[perl #42769] Names of basic PMC serve as keywords in PIR

2007-09-09 Thread Bernhard Schmalhofer via RT
On So. 29. Apr. 2007, 06:01:16, kjs wrote:

In r21167 the keyword 'object', as a synonym of 'pmc', was removed from
PIR. 
However the question from kjs remains to be answered:

 related to this, I think that imcc also allows for built-in types as
types.
 such as .local Array a etc. (sorry can't check; don't have my own pc
 around here, this is a public pc) (I added some notes about this and other
 PIR cleanups in languages/PIR and I think also in compilers/pirc IIRC).
 
 IMHO, this is not needed; pmc is sufficient, and it'd be nice to
keep PIR
 as simple as possible, after all it's an intermediate language. Moreover,
 everytime a built-in type is added (although not happening that often) the
 grammar would have to be updated to stay consistent.

I second the suggestion from kjs. It isn't helpful to be able to say:

  .local Array my_string
  my_string = new String


Regards,
  Bernhard

-- 
/* [EMAIL PROTECTED] */