:
">
> -Original Message-
> From: Carl Smith [mailto:[EMAIL PROTECTED]
> Sent: 23 January 2005 21:18
> To: Struts Users Mailing List
> Subject: RE: [OT] Re: constants interface
>
> Thanks all for the hot discussion. However, the discussion has gone too far
> off my original qu
Heck, I only get frisky with perceived slights. ;-) I think
something is wrong with this Eddie. Try the following two classes and
interface and you will fidn that if you (1) compile all three, then
change the Xs in the constants to Ys and recompile only the TestClass,
you will get all Ys in all
On Sun, 23 Jan 2005 16:06:42 -0600, Eddie Bush <[EMAIL PROTECTED]> wrote:
> Not to start another holy war, but perhaps you all could help me
> either solidify or dispell something I learned ...
>
> I've always been of the impression that mentioning a value for a
> startic final member is poor for
My question was a lot lower-level than your answer. In fact, I don't
see how your answer is applicable to the question I posed.
On Sun, 23 Jan 2005 14:47:47 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
> The design question is whether you can live with any and all uses of
> the interface constan
January 2005 21:18
> To: Struts Users Mailing List
> Subject: RE: [OT] Re: constants interface
>
> Thanks all for the hot discussion. However, the discussion has gone too far
> off my original question. I suggest not to discuss whether or not we should
> have an interface just for con
Not to start another holy war, but perhaps you all could help me
either solidify or dispell something I learned ...
I've always been of the impression that mentioning a value for a
startic final member is poor form, and that this should always be done
in a static intializer, thus:
public class Fo
OK..
So if you must use the constant interface WayOne would get my vote.
db
-Original Message-
From: Carl Smith [mailto:[EMAIL PROTECTED]
Sent: 23 January 2005 21:18
To: Struts Users Mailing List
Subject: RE: [OT] Re: constants interface
Thanks all for the hot discussion. However
ailing List'; 'Dakota Jack'
Subject: [OT] Re: constants interface
Hello Jack, list,
Ok, maybe I shouldn't write things like "No, as usual, you miss my point.",
but actually this is true, which is I assume more my fault, as I fail to
explain my thoughts understandable, then y
;Struts Users Mailing List'; 'Dakota Jack'
Subject: [OT] Re: constants interface
Hello Jack, list,
Ok, maybe I shouldn't write things like "No, as usual, you miss my point.",
but actually this is true, which is I assume more my fault, as I fail to
explain my thoughts und
08
To: 'Struts Users Mailing List'; 'Dakota Jack'
Subject: [OT] Re: constants interface
Hello Jack, list,
Ok, maybe I shouldn't write things like "No, as usual, you miss my point.",
but actually this is true, which is I assume more my fault, as I fail to
explai
t; An: Struts Users Mailing List; [EMAIL PROTECTED]
> Betreff: Re: [OT] Re: constants interface
>
> Yah, you're right. But what gets me going is not code issues. I
> could care less about disagreements about that. I should ignore
> things like " No, as usual, you mi
t; An: Struts Users Mailing List; [EMAIL PROTECTED]
> Betreff: Re: [OT] Re: constants interface
>
> Yah, you're right. But what gets me going is not code issues. I
> could care less about disagreements about that. I should ignore
> things like " No, as usual, you mi
On Sat, 22 Jan 2005 13:43:25 -0800, Dakota Jack wrote:
> To summarize Joshua Bloch,
And Anders Hejlsberg agreed [http://c2.com/cgi/wiki?AndersHejlsberg].
In C#, constants are not permitted to be members of an interface.
-Ted.
---
Yah, you're right. But what gets me going is not code issues. I
could care less about disagreements about that. I should ignore
things like " No, as usual, you miss my point. ", but I just cannot
get used to that sort of thing, it seems. I'll try harder to ignore
them. I am sure my getting tic
:[EMAIL PROTECTED]
Sent: Saturday, January 22, 2005 3:43 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: constants interface
To summarize Joshua Bloch,
Once you use an interface for constants, you allow users of that
interface to implement the interface to access the constants
:[EMAIL PROTECTED]
Sent: Saturday, January 22, 2005 3:43 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: constants interface
To summarize Joshua Bloch,
Once you use an interface for constants, you allow users of that
interface to implement the interface to access the constants
Wow, this is getting a little hostile fellas...
It's not like we're trying to decide whether Heidi Klum is hotter than
Tyra Banks (she is, but not by much), and we're not trying to decide
whether Enterprise should be cancelled (I say one more season to right
the ship), and it's not like we're tr
On Sun, 23 Jan 2005 01:49:56 +0100, Leon Rosenberg
<[EMAIL PROTECTED]> wrote:
>
> > I think the whole thing comes down to Leon thinking that
> > classes cannot implement a constant interface, which they can
> > and, unfortunately do. The important thing, however, is that
> > they can and that me
> I think the whole thing comes down to Leon thinking that
> classes cannot implement a constant interface, which they can
> and, unfortunately do. The important thing, however, is that
> they can and that means that your design will be flawed if
> you do that.
>
> Am I getting you right, L
> I think the whole thing comes down to Leon thinking that
> classes cannot implement a constant interface, which they can
> and, unfortunately do. The important thing, however, is that
> they can and that means that your design will be flawed if
> you do that.
>
> Am I getting you right, L
On Sat, 22 Jan 2005 17:39:47 -0500, Frank W. Zammetti
<[EMAIL PROTECTED]> wrote:
> >>Which is why the use of an interface instead of a class makes
> >>no sense. It merely makes bad coding possible and does
> >>nothing else for you.
>
> Jack, your not saying using an interface in general is bad I
Which is why the use of an interface instead of a class makes
no sense. It merely makes bad coding possible and does
nothing else for you.
Jack, your not saying using an interface in general is bad I hope?!? :)
This is an interesting discussion, but obviously off topic, so I've
marked my respon
> Which is why the use of an interface instead of a class makes
> no sense. It merely makes bad coding possible and does
> nothing else for you.
I have to disagree.
If I have a constant pool in a class, i have to protect it from
instantiation (giving it private constructor) and give it a spe
> Which is why the use of an interface instead of a class makes
> no sense. It merely makes bad coding possible and does
> nothing else for you.
I have to disagree.
If I have a constant pool in a class, i have to protect it from
instantiation (giving it private constructor) and give it a spe
Januar 2005 16:59
> > An: Struts Users Mailing List
> > Betreff: Re: constants interface
> >
> > I'm not sure there's a "better" answer... I'd say I see the first
> > approach used more often... In fact, I'm not sure I can think of
To summarize Joshua Bloch,
Once you use an interface for constants, you allow users of that
interface to implement the interface to access the constants.
However, that a class uses a constant internally is an implementation
detail. The combination of these two things means that an
implementation
> The thread initiation example was ok according to bloch.
Sorry, small correction, the thread example wasn't ok according to bloch,
but since anyone in the world, including mr. Bloch himself, are using
interfaces to export constants, i think it's considered ok...
> The thread initiation example was ok according to bloch.
Sorry, small correction, the thread example wasn't ok according to bloch,
but since anyone in the world, including mr. Bloch himself, are using
interfaces to export constants, i think it's considered ok...
; >
> > db
> >
> >
> > -Original Message-
> > From: Carl Smith [mailto:[EMAIL PROTECTED]
> > Sent: 22 January 2005 15:50
> > To: user@struts.apache.org
> > Subject: constants interface
> >
> >
> > In Java, someti
; >
> > db
> >
> >
> > -Original Message-
> > From: Carl Smith [mailto:[EMAIL PROTECTED]
> > Sent: 22 January 2005 15:50
> > To: user@struts.apache.org
> > Subject: constants interface
> >
> >
> > In Java, someti
stant utility class as in..
public class MyInterface {
public static final String YES = "yes";
}
db
-Original Message-
From: Carl Smith [mailto:[EMAIL PROTECTED]
Sent: 22 January 2005 15:50
To: user@struts.apache.org
Subject: constants interface
In Java, sometimes you would define
YES = "yes";
}
db
-Original Message-
From: Carl Smith [mailto:[EMAIL PROTECTED]
Sent: 22 January 2005 15:50
To: user@struts.apache.org
Subject: constants interface
In Java, sometimes you would define an interface containg the constants:
public interface MyInterface {
public
det: Samstag, 22. Januar 2005 16:59
> An: Struts Users Mailing List
> Betreff: Re: constants interface
>
> I'm not sure there's a "better" answer... I'd say I see the first
> approach used more often... In fact, I'm not sure I can think of an
> instanc
det: Samstag, 22. Januar 2005 16:59
> An: Struts Users Mailing List
> Betreff: Re: constants interface
>
> I'm not sure there's a "better" answer... I'd say I see the first
> approach used more often... In fact, I'm not sure I can think of an
> instanc
I'm not sure there's a "better" answer... I'd say I see the first
approach used more often... In fact, I'm not sure I can think of an
instance where I've seen the second approach *IF* we're talking about an
interface specifically for storing constants... Obviously when your
extending an interfa
In Java, sometimes you would define an interface containg the constants:
public interface MyInterface {
public static final String YES = "yes";
}
To access the contants, there are two ways
public class WayOne {
public void myMethod(){
String yes = MyInterface.YES;
36 matches
Mail list logo