2 ms·
>Declaring Data as interface{} allows a struct to initialize Data, and therefore a node in this graphing library can store anything (including another graph). T
by wyager 13y ago
>Declaring Data as interface{} allows a struct to initialize Data, and therefore a node in this graphing library can store anything (including another graph). This is probably one of the most important characteristics of Go.
"Declaring Data as Object allows a class to initialize Data, and therefore a node in this graphing library can store anything (including another graph). This is probably one of the most important characteristics of Java."
- Probably someone before 2004, when Java programmers hadn't yet realized that using the most general type to do anything is a terrible idea