The Trunk: Tools-cmm.231.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tools-cmm.231.mcz

commits-2
Chris Muller uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-cmm.231.mcz

==================== Summary ====================

Name: Tools-cmm.231
Author: cmm
Time: 22 April 2010, 12:23:43.234 pm
UUID: bbca9c17-2eab-4dfa-888c-031a276042c3
Ancestors: Tools-ar.230

- Removed generation of meaningless comments when generating inst-var accessors.

=============== Diff against Tools-ar.230 ===============

Item was changed:
  ----- Method: Browser>>createInstVarAccessors (in category 'class functions') -----
  createInstVarAccessors
  "Create getters and setters for all inst vars defined at the level of the current class selection, except do NOT clobber or override any selectors already understood by the instances of the selected class"
 
  | aClass |
  (aClass := self selectedClassOrMetaClass) ifNotNil:
  [aClass instVarNames do:
  [:aName |
  | newMessage setter |
  (aClass canUnderstand: aName asSymbol)
  ifFalse:
  [newMessage := aName, '
- "Answer the value of ', aName, '"
-
  ^ ', aName.
  aClass compile: newMessage classified: 'accessing' notifying: nil].
  (aClass canUnderstand: (setter := aName, ':') asSymbol)
  ifFalse:
  [newMessage := setter, ' anObject
- "Set the value of ', aName, '"
-
  ', aName, ' := anObject'.
  aClass compile: newMessage classified: 'accessing' notifying: nil]]]!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-cmm.231.mcz

Tobias Pape
Hi.
I'm happy about this one.
However, would it be possible to (optionally)
have a blank line between the message signature and
the method content?
I know its a matter of taste, but the often found 2-line
getters and setters look _so_ condensed to me :)

So Long,
        -Tobias


Am 2010-04-22 um 17:23 schrieb [hidden email]:

> Chris Muller uploaded a new version of Tools to project The Trunk:
> http://source.squeak.org/trunk/Tools-cmm.231.mcz
>
> ==================== Summary ====================
>
> Name: Tools-cmm.231
> Author: cmm
> Time: 22 April 2010, 12:23:43.234 pm
> UUID: bbca9c17-2eab-4dfa-888c-031a276042c3
> Ancestors: Tools-ar.230
>
> - Removed generation of meaningless comments when generating inst-var accessors.


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-cmm.231.mcz

Chris Muller-3
When I first started Smalltalk I liked blank lines in methods to
separate out different sections of methods.  But my mentor told me,
"if you have different 'sections' then you need to compose additional
methods for those sections.  You should therefore not have blank
lines."

Plus, with Shout there is delineation by color.

"_so_ condensed" is a good thing isn't it?   :-)


On Thu, Apr 22, 2010 at 3:15 PM, Tobias Pape <[hidden email]> wrote:

> Hi.
> I'm happy about this one.
> However, would it be possible to (optionally)
> have a blank line between the message signature and
> the method content?
> I know its a matter of taste, but the often found 2-line
> getters and setters look _so_ condensed to me :)
>
> So Long,
>        -Tobias
>
>
> Am 2010-04-22 um 17:23 schrieb [hidden email]:
>
>> Chris Muller uploaded a new version of Tools to project The Trunk:
>> http://source.squeak.org/trunk/Tools-cmm.231.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Tools-cmm.231
>> Author: cmm
>> Time: 22 April 2010, 12:23:43.234 pm
>> UUID: bbca9c17-2eab-4dfa-888c-031a276042c3
>> Ancestors: Tools-ar.230
>>
>> - Removed generation of meaningless comments when generating inst-var accessors.
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-cmm.231.mcz

jsarkela
When I first started Smalltalk, my style mentor was Roxy Rochat... who wrote the original Tektronix style guide. That guide strongly advocated a single blank line in a method to separate message specification from method implementation. I myself regularly fix pretty printers to support this approach. IMHO, it should be an option to allow this single blank line.

John Sarkela [|]

On Apr 23, 2010, at 11:49 AM, Chris Muller wrote:

> When I first started Smalltalk I liked blank lines in methods to
> separate out different sections of methods.  But my mentor told me,
> "if you have different 'sections' then you need to compose additional
> methods for those sections.  You should therefore not have blank
> lines."
>
> Plus, with Shout there is delineation by color.
>
> "_so_ condensed" is a good thing isn't it?   :-)
>
>
> On Thu, Apr 22, 2010 at 3:15 PM, Tobias Pape <[hidden email]> wrote:
>> Hi.
>> I'm happy about this one.
>> However, would it be possible to (optionally)
>> have a blank line between the message signature and
>> the method content?
>> I know its a matter of taste, but the often found 2-line
>> getters and setters look _so_ condensed to me :)
>>
>> So Long,
>>        -Tobias
>>
>>
>> Am 2010-04-22 um 17:23 schrieb [hidden email]:
>>
>>> Chris Muller uploaded a new version of Tools to project The Trunk:
>>> http://source.squeak.org/trunk/Tools-cmm.231.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Tools-cmm.231
>>> Author: cmm
>>> Time: 22 April 2010, 12:23:43.234 pm
>>> UUID: bbca9c17-2eab-4dfa-888c-031a276042c3
>>> Ancestors: Tools-ar.230
>>>
>>> - Removed generation of meaningless comments when generating inst-var accessors.
>>
>>
>>
>