Timeline for Is it a bad practice to have an interface to define constants?
Current License: CC BY-SA 2.5
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 1, 2014 at 15:05 | comment | added | jwenting | that'd depend on the programming language I guess. In case of Java, no. | |
| Feb 24, 2011 at 13:17 | comment | added | CMR | @jwenting Also, could a public interface "at most expose their names", without exposing the values? | |
| Feb 24, 2011 at 12:02 | comment | added | CMR | Cases in point: javax.naming.Context, javax.ims.Session, and hundreds of such interfaces... | |
| Feb 24, 2011 at 8:00 | comment | added | jwenting | interfaces are public contracts. Constant VALUES are private concerns, the public interface should at most expose their names. That's best left to an abstract class. | |
| Feb 19, 2011 at 2:18 | history | answered | CMR | CC BY-SA 2.5 |