Re: [perl #42769] can't create a variable named 'object'

2007-09-10 Thread Patrick R. Michaud
On Sun, Sep 09, 2007 at 04:18:04AM -0700, Bernhard Schmalhofer via RT wrote:
  On Fri Apr 27 09:36:50 2007, particle wrote:
   it seems that 'object' is a reserved word in imcc, it's a synonym for
   'pmc'. it seems undocumented, and i don't see a reason for it--we
   already have a word for 'pmc'.
  
  I removed 'object' from IMCC lexer and grammar, so it's not a reserved
  word anymore and can be normally used as a variable name:
 
 The patch from smash did not apply cleanly any more, so I manually
 applied it and add a test. The new patch is attached.
 
 Does anybody mind if 'object' is removed as an alias of 'pmc'?
 As 'object' hasn't been documented, I think that no deprecation cycle
 is necessary.

I agree, let's eliminate 'object' asap.  

Pm


[perl #42769] can't create a variable named 'object'

2007-09-09 Thread Bernhard Schmalhofer via RT
On Fr. 27. Apr. 2007, 14:02:49, smash wrote:
 
 On Fri Apr 27 09:36:50 2007, particle wrote:
  it seems that 'object' is a reserved word in imcc, it's a synonym for
  'pmc'. it seems undocumented, and i don't see a reason for it--we
  already have a word for 'pmc'.

 
 I removed 'object' from IMCC lexer and grammar, so it's not a reserved
 word anymore and can be normally used as a variable name:
 

The patch from smash did not apply cleanly any more, so I manually
applied it and add a test. The new patch is attached.

Does anybody mind if 'object' is removed as an alias of 'pmc'?
As 'object' hasn't been documented, I think that no deprecation cycle
is necessary.

Regards,
  Bernhard

-- 
/* [EMAIL PROTECTED] */


Re: [perl #42769] can't create a variable named 'object'

2007-04-29 Thread Klaas-Jan Stol

hi,

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.

my 2c,
kjs



On 4/28/07, via RT Jerry Gay [EMAIL PROTECTED] wrote:


# New Ticket Created by  Jerry Gay
# Please include the string:  [perl #42769]
# in the subject line of all future correspondence about this issue.
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42769 


it seems that 'object' is a reserved word in imcc, it's a synonym for
'pmc'. it seems undocumented, and i don't see a reason for it--we
already have a word for 'pmc'.

D:\usr\local\parrot\headparrot -
.sub main
.local pmc object
.end
^Z
error:imcc:syntax error, unexpected OBJECTV, expecting IDENTIFIER
 in file '-' line 2


sure enough, i can create a '.local object foo':

D:\usr\local\parrot\headparrot -
.sub main
.local object foo
foo = new 'String'
foo = 'bar'
say foo
.end
^Z
bar


i suggest we deprecate 'object'.
~jerry



[perl #42769] can't create a variable named 'object'

2007-04-27 Thread via RT
# New Ticket Created by  Jerry Gay 
# Please include the string:  [perl #42769]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42769 


it seems that 'object' is a reserved word in imcc, it's a synonym for
'pmc'. it seems undocumented, and i don't see a reason for it--we
already have a word for 'pmc'.

  D:\usr\local\parrot\headparrot -
  .sub main
  .local pmc object
  .end
  ^Z
  error:imcc:syntax error, unexpected OBJECTV, expecting IDENTIFIER
  in file '-' line 2


sure enough, i can create a '.local object foo':

  D:\usr\local\parrot\headparrot -
  .sub main
  .local object foo
  foo = new 'String'
  foo = 'bar'
  say foo
  .end
  ^Z
  bar


i suggest we deprecate 'object'.
~jerry