13 ms·
I'm still unclear on what you mean by "first class". In Java, you could pass in WeatherProvider.class to tell it that you want it to produce a WeatherProvider
by AnimalMuppet 13y ago
I'm still unclear on what you mean by "first class".
In Java, you could pass in WeatherProvider.class to tell it that you want it to produce a WeatherProvider instance or a string that said "WeatherProvider". Is that the kind of thing you have in mind?
- vectorpush 13y agoI am not a Java programmer but the Java class literal seems like a perfect example. The class literal provides a language mechanism for representing a type of class (in Go's case it would be a type of struct) without the need for an actual instance of the class or another arbitrary data type (like a string or const) that the application is programmed to recognize as a signal for that class.