On Fri, Nov 13, 2009 at 3:48 PM, Tim Newsham <news...@lava.net> wrote: >> * A ducktyping of sorts with interfaces and such. On the surface >> it just saves >> you a bunch of "extends XXX", but it actually seems to bridge >> the gap between >> dynamically typed world and a statically typed one to an extent >> that makes me >> rethink whether static typed languages are as devoid of fun as a >> Principia Mathematica is. > > The type system is more restrictive than duck typing. Thats sort > of the point of any static type system. But there are useful constructs > that you can express in a dynamically typed language or a language > with a more complex type system that you cannot express in go. A > good, simple example is "map". Go would need generics to support it. >
$GOOROOT/src/pkg/bytes/bytes.go:248 func ToLower(s []byte) []byte { return Map(unicode.ToLower, s) }