Pragma for accessors

Project:GNU Smalltalk
Component:Base classes
Category:feature
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

Instead of doint
Object subclass: Foo [

 | a b c |

  a []
  a: anObject [ ]
  ...

]

Why not :

Object subclass: Foo [

accesssor: {#a. #b. #c.}

]

Updates

#1 submitted by Stefan Schmiedl on Tue, 01/12/2010 - 07:51

Would that pragma both declare the variables and define readers and writers?

If so, wouldn't it make sense to also have similar 'reader' and 'writer' pragmas, only defining the respective methods?

#2 submitted by Gwenael Casaccio on Thu, 07/28/2011 - 09:31
Status:active» won't fix

User login