News for hackers. Stuff that matters.
Re:From Node.js to Go by je42 on Friday January 30, 2015 @05:07AM (#8971306)
Guarantees at compile time:

Array<double> means the only element you will encounter is a double.

Array<ISomeInterface> means the only element you will encounter is of type ISomeInterface.

hence, you can express part of some code's requirements via the types that a function,class exposes and/or requires.

these requirements can then be checked at compile time.

without this you have to defer the "checking" to runtime.

Re:From Node.js to Go by Kiro on Friday January 30, 2015 @05:36AM (#8971373)
I'm sorry, I meant why generics are a big deal. Thanks though!