4 ms·
This is a good look at the dangers of diffusing semantic knowledge in general. His approach is much more true to OOP paradigms. In Java, you can take this a st
by bthornbury 12y ago
This is a good look at the dangers of diffusing semantic knowledge in general. His approach is much more true to OOP paradigms.
In Java, you can take this a stop further, and use enums basically as enumerated instances of a class. Example:
public enum Stuff {
Stuff1(param1),
Stuff2(param2);
private Object param;
private Stuff(Object param){
this.param = param;
}
public getParam(){
return this.param;
}
}
Now you can call Stuff1.getParam();
- masklinn 12y ago> In Java, you can take this a stop further, and use enums basically as enumerated instances of a class. Isn't it half the point of java's enums? (the other half being type-safe enums).