IA 100

5 views
Skip to first unread message

mP

unread,
May 14, 2013, 8:00:28 AM5/14/13
to illegal...@googlegroups.com
@Richard
You mentioned you like including collaborating classes inside the main class. Ive included a boring example below. 

Something {
  Builder
  Comparator
  Matcher
}

You didnt however mention how you name your classes ?

Personally i always include the main class as a prefix to the collaborators.

Moandji Ezana

unread,
May 14, 2013, 8:10:45 AM5/14/13
to illegalargument

On Tue, May 14, 2013 at 2:00 PM, mP <miroslav...@gmail.com> wrote:
Personally i always include the main class as a prefix to the collaborators.

Why? I always refer to them as Something.Builder to disambiguate.

Richard Vowles

unread,
May 14, 2013, 2:28:27 PM5/14/13
to illegalargument

I do too, but I'm not sure why...

--
 
---
You received this message because you are subscribed to the Google Groups "illegalargument" group.
To unsubscribe from this group and stop receiving emails from it, send an email to illegalargume...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

mP

unread,
May 14, 2013, 7:02:40 PM5/14/13
to illegal...@googlegroups.com
 
Well if you extract Something.Builder into its own file, your naming is now broken.

Mark Derricutt

unread,
May 14, 2013, 9:40:51 PM5/14/13
to illegal...@googlegroups.com

Surely then, and only then would you consider renaming the class to better suit it's new location.

You're going to be modifying every class that used the builder anyway so renaming at the same time isn't going to hurt.

Of course, you could have a static .builder() method on the root class to access the builder regardless of where it is and not break import statements but that's another topic..

Sent from an Android...

On 15/05/2013 11:02 AM, "mP" <miroslav...@gmail.com> wrote:
 
Well if you extract Something.Builder into its own file, your naming is now broken.

--
Reply all
Reply to author
Forward
0 new messages