News for hackers. Stuff that matters.
Re:"100% of our production system is now running Go" by draven on Friday August 31, 2012 @05:43AM (#4458972)
Go does not have generics per se but that container looks pretty generic to me.

What's your definition of generic programming BTW? I'm looking at several definition right now and cannot find out if, for example, a generic list container in C using void pointers to data would be considered generic programming.

Wikipedia states generic programming is "a computer programming paradigm based on method/functions or classes defined irrespective of the concrete data types used upon instantiation". That reads like "templates" to me.

Re:"100% of our production system is now running Go" by microtherion on Friday August 31, 2012 @06:37AM (#4459076)
To me, generic programming implies preserving all type information, which is something the above Go container does not do (when you get an element out of the container, you cannot tell statically what type it is).

Templates are generic, but so is, e.g. the type inference used in functional languages.

Re:"100% of our production system is now running Go" by qznc on Friday August 31, 2012 @06:44AM (#4459093)
In some sense, you can do generic programming with C by using void*, but this throws out type safety.
Re:"100% of our production system is now running Go" by sixbrx on Friday August 31, 2012 @08:55AM (#4459445)
I'd say void pointers are more untyped programming than generic programming.