[update 1.2] #12012

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

Re: Maybe a brain dead idea

FDominicus
I want it because this classes are just for a migration from RDB to
Smalltalk. No I see not smells because I do really want to get all the
data from the Relations accessible. Feel free to ask the ActiveRecord
developers or their smells.

Regards
Friedrich

--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus

Reply | Threaded
Open this post in threaded view
|

Re: Maybe a brain dead idea

FDominicus
In reply to this post by Lukas Renggli
Lukas Renggli <[hidden email]> writes:

> In OB/RB you can select "refactor class > create accessors" or on invidual
> variables "refactor variable > create accessors"; as well as refactor your
> classes to use direct variable access or accessors (both ways).
That's in the browser or not. I use it to generate a complete code for a
class with a program.

Regards
Friedrich

--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus

Reply | Threaded
Open this post in threaded view
|

Re: Maybe a brain dead idea

Randal L. Schwartz
In reply to this post by Dale Henrichs
>>>>> "Dale" == Dale Henrichs <[hidden email]> writes:

Dale> |
Dale> | You should design your object's interface respecting the needed
Dale> | protocols, not its internal design.  Bad code smell otherwise.

Dale> If your intent is to provide for subclassing in the future (or
Dale> tomorrow), then you should use accessors exclusively. There is a
Dale> place for such tool functionality.

I disagree even with that.  An "instance variable" is not an
interface... it's an implementation detail, even in the presence of
subclassing.  The interface should be about the behavior, not the
implementation.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion

Reply | Threaded
Open this post in threaded view
|

Re: Maybe a brain dead idea

Dale Henrichs
Randal,

In certain situations a method (accessor or not) is an "implementation detail" ..."the smell is in the nose of the sniffer"...

Dale

----- Original Message -----
| From: "Randal L. Schwartz" <[hidden email]>
| To: "Dale Henrichs" <[hidden email]>
| Cc: [hidden email]
| Sent: Wednesday, July 27, 2011 8:35:19 AM
| Subject: Re: [Pharo-project] Maybe a brain dead idea
|
| >>>>> "Dale" == Dale Henrichs <[hidden email]> writes:
|
| Dale> |
| Dale> | You should design your object's interface respecting the
| needed
| Dale> | protocols, not its internal design.  Bad code smell
| otherwise.
|
| Dale> If your intent is to provide for subclassing in the future (or
| Dale> tomorrow), then you should use accessors exclusively. There is
| a
| Dale> place for such tool functionality.
|
| I disagree even with that.  An "instance variable" is not an
| interface... it's an implementation detail, even in the presence of
| subclassing.  The interface should be about the behavior, not the
| implementation.
|
| --
| Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503
| 777 0095
| <[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
| Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
| See http://methodsandmessages.posterous.com/ for Smalltalk discussion
|

12