You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Gary Gregory <ga...@gmail.com> on 2012/11/03 03:49:36 UTC

[v2] Use of Layout

Should we have a

  public interface StringLayout extends Layout<String>

such that

  public abstract class AbstractStringLayout extends StringLayout

instead of

  public abstract class AbstractStringLayout extends AbstractLayout<String>

and we can then use code that uses StringLayout instead of now Layout +
compiler warnings for generics.

I am not considering using AbstractLayout<String> because it does not feel
right.

Thoughts?

Gary

-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [v2] Use of Layout

Posted by Gary Gregory <ga...@gmail.com>.
I'm dropping this one for today because we seem to mix byte[] and String
Layouts in Appenders, so this needs more thought.

Gary

On Fri, Nov 2, 2012 at 11:15 PM, Gary Gregory <ga...@gmail.com>wrote:

>
> On Nov 2, 2012, at 22:54, Ralph Goers <ra...@dslextreme.com> wrote:
>
> Didn't we try something recently that caused compile errors?
>
>
> I don't recall. Hm.
>
>
> In case you haven't noticed I'm more into features and functions than
> names. :-)
>
>
>
> Yes I agree but names are important too. Especially for library like this.
> Good names help communicate intention. Without good names it is harder to
> grok the code  I like to think that how you do any thing is how you do
> everything. Having good names on top of food features shows that we take
> great care and pride in our work. I do have to say the the v2 code base is
> impressive as it was when I joined. So a lot of this is icing on the cake
> :) Bringing it all to a higher level if you like.
>
>  I don't even see the generic warnings, but maybe thats because my IDE is
> set to Java 6.
>
>
> You probably do not have these warnings turned on. Java 6 has a little
> more warning opportunity than 5.
>
> I work with code that don't have generics and I hate the guessing game and
> type casting. How can wsdl4j not have been updated in years!
>
>
> If you can make the change below and nothing breaks then I'm OK with it.
>
>
> Check.
>
> Gary
>
>
> Ralph
>
> On Nov 2, 2012, at 7:49 PM, Gary Gregory wrote:
>
> Should we have a
>
>   public interface StringLayout extends Layout<String>
>
> such that
>
>   public abstract class AbstractStringLayout extends StringLayout
>
> instead of
>
>   public abstract class AbstractStringLayout extends
> AbstractLayout<String>
>
> and we can then use code that uses StringLayout instead of now Layout +
> compiler warnings for generics.
>
> I am not considering using AbstractLayout<String> because it does not feel
> right.
>
> Thoughts?
>
> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977/>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [v2] Use of Layout

Posted by Gary Gregory <ga...@gmail.com>.
On Nov 2, 2012, at 22:54, Ralph Goers <ra...@dslextreme.com> wrote:

Didn't we try something recently that caused compile errors?


I don't recall. Hm.


In case you haven't noticed I'm more into features and functions than
names. :-)



Yes I agree but names are important too. Especially for library like this.
Good names help communicate intention. Without good names it is harder to
grok the code  I like to think that how you do any thing is how you do
everything. Having good names on top of food features shows that we take
great care and pride in our work. I do have to say the the v2 code base is
impressive as it was when I joined. So a lot of this is icing on the cake
:) Bringing it all to a higher level if you like.

 I don't even see the generic warnings, but maybe thats because my IDE is
set to Java 6.


You probably do not have these warnings turned on. Java 6 has a little more
warning opportunity than 5.

I work with code that don't have generics and I hate the guessing game and
type casting. How can wsdl4j not have been updated in years!


If you can make the change below and nothing breaks then I'm OK with it.


Check.

Gary


Ralph

On Nov 2, 2012, at 7:49 PM, Gary Gregory wrote:

Should we have a

  public interface StringLayout extends Layout<String>

such that

  public abstract class AbstractStringLayout extends StringLayout

instead of

  public abstract class AbstractStringLayout extends AbstractLayout<String>

and we can then use code that uses StringLayout instead of now Layout +
compiler warnings for generics.

I am not considering using AbstractLayout<String> because it does not feel
right.

Thoughts?

Gary

-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977/>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [v2] Use of Layout

Posted by Ralph Goers <ra...@dslextreme.com>.
Didn't we try something recently that caused compile errors?

In case you haven't noticed I'm more into features and functions than names. :-)  I don't even see the generic warnings, but maybe thats because my IDE is set to Java 6. 

If you can make the change below and nothing breaks then I'm OK with it.

Ralph

On Nov 2, 2012, at 7:49 PM, Gary Gregory wrote:

> Should we have a 
> 
>   public interface StringLayout extends Layout<String>
> 
> such that 
> 
>   public abstract class AbstractStringLayout extends StringLayout
> 
> instead of
> 
>   public abstract class AbstractStringLayout extends AbstractLayout<String>
> 
> and we can then use code that uses StringLayout instead of now Layout + compiler warnings for generics. 
> 
> I am not considering using AbstractLayout<String> because it does not feel right.
> 
> Thoughts?
> 
> Gary
> 
> -- 
> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com 
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory