Re: [OT] Re: constants interface

2005-01-23 Thread Dakota Jack
: "> > -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

Re: [OT] Re: constants interface

2005-01-23 Thread Dakota Jack
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

Re: [OT] Re: constants interface

2005-01-23 Thread Craig McClanahan
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

Re: [OT] Re: constants interface

2005-01-23 Thread Eddie Bush
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

Re: [OT] Re: constants interface

2005-01-23 Thread Dakota Jack
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

Re: [OT] Re: constants interface

2005-01-23 Thread Eddie Bush
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

RE: [OT] Re: constants interface

2005-01-23 Thread David Bolsover
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

Re: [OT] Re: constants interface

2005-01-23 Thread Frank W. Zammetti
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

RE: [OT] Re: constants interface

2005-01-23 Thread Carl Smith
;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

RE: [OT] Re: constants interface

2005-01-23 Thread David Bolsover
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

[OT] Re: constants interface

2005-01-23 Thread Leon Rosenberg
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

[OT] Re: constants interface

2005-01-23 Thread Leon Rosenberg
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

[OT] Re: constants interface

2005-01-23 Thread Ted Husted
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. ---

Re: [OT] Re: constants interface

2005-01-22 Thread Dakota Jack
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

RE: OT constants interface

2005-01-22 Thread e-denton Java Programmer
:[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

RE: OT constants interface

2005-01-22 Thread e-denton Java Programmer
:[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

Re: [OT] Re: constants interface

2005-01-22 Thread Frank W. Zammetti
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

Re: [OT] Re: constants interface

2005-01-22 Thread Dakota Jack
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

[OT] Re: constants interface

2005-01-22 Thread Leon Rosenberg
> 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

[OT] Re: constants interface

2005-01-22 Thread Leon Rosenberg
> 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

Re: [OT] Re: constants interface

2005-01-22 Thread Dakota Jack
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

[OT] Re: constants interface

2005-01-22 Thread Frank W. Zammetti
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

re: constants interface

2005-01-22 Thread Leon Rosenberg
> 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

re: constants interface

2005-01-22 Thread Leon Rosenberg
> 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

Re: constants interface

2005-01-22 Thread Dakota Jack
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

Re: constants interface

2005-01-22 Thread Dakota Jack
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

AW: constants interface

2005-01-22 Thread Leon Rosenberg
> 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...

AW: constants interface

2005-01-22 Thread Leon Rosenberg
> 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...

AW: constants interface

2005-01-22 Thread Leon Rosenberg
; > > > 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

AW: constants interface

2005-01-22 Thread Leon Rosenberg
; > > > 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

Re: constants interface

2005-01-22 Thread Frank W. Zammetti
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

RE: constants interface

2005-01-22 Thread David Bolsover
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

RE: constants interface

2005-01-22 Thread Leon Rosenberg
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

RE: constants interface

2005-01-22 Thread Leon Rosenberg
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

Re: constants interface

2005-01-22 Thread Frank W. Zammetti
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

constants interface

2005-01-22 Thread Carl Smith
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;