News for hackers. Stuff that matters.
Re:Nimrod: A New Approach to Metaprogramming [video] by skybrian on Thursday January 16, 2014 @05:28PM (#7072951)
Actually it's a big improvement for large-scale programming due its effect on library dependencies. In Go you can easily declare an interface that matches a type in someone else's library without creating a hard dependency on that library. You can also superset and subset interfaces easily. That way you get loose coupling (almost like "duck-typing") in a mostly statically checked language.

Contrast with Java where you'd have to both create a new interface and write an adapter class in a separate "glue" library that has hard dependencies on both libraries.

Re:Nimrod: A New Approach to Metaprogramming [video] by klibertp on Thursday January 16, 2014 @06:03PM (#7073115)
I don't want to sound dismissive, but I think very few people here would like to "contrast with Java". We're (I am for sure) thinking more along the lines of comparing with Rust, OCaml, Haskell or Scala. Or Opa. Or Felix. Or Ur/Web. Or any number of modern languages implementing rich type systems.

Anyway, I believe this feature is very handy. It's not "new" however. As noted, OCaml objects - and also modules - support structure typing too. And you can't call OCaml a new language. Scala supports it too, in more than one way. And so on.

Also, compared to powerful and extremely rich type-systems that these other languages got Go's seems rather limited. What I meant by interfaces not being a "serious feature" - I should have said it differently, I know - was that compared to other features of modern type systems it's not that significant. I get a feeling that it only looks like it is in Go because it lacks those other features.

And BTW, that's a concious decision of language designers to keep the language simple. I don't say it's a bad decision, either. I just want to note that Go indeed is simple (at least in regard of types) and not that innovative. And also that using Java as a baseline is not the most ambitious thing to do. ;)

Re:Nimrod: A New Approach to Metaprogramming [video] by pjmlp on Thursday January 16, 2014 @05:47PM (#7073038)
On the other hand when looking at type X you don't don't which set of interfaces it supports.

Not very good for large scale programming, I would say.

As for comparing with Java, well, yes it is true.

However there are plenty of strong typed languages which offer similar capabilities.

Re:Nimrod: A New Approach to Metaprogramming [video] by skybrian on Thursday January 16, 2014 @07:17PM (#7073421)
I don't think it matters that much from a library maintainer's point of view.

If you you want to change a public method and can find all the type's usages, an IDE or search engine can tell you which call sites will break. (Or just compile everything and see what happens.)

If you can't find all the type's usages, you're screwed anyway because any change that would break an interface will also break a call site that calls a method directly, without using an interface. So having all the interfaces declared right there doesn't help that much.

Re:Nimrod: A New Approach to Metaprogramming [video] by pjmlp on Friday January 17, 2014 @02:15AM (#7074685)
> I don't think it matters that much from a library maintainer's point of view

From a large scale application developer point of view it matters a lot.

In code bases developed by 50+ developers across multiple sites, it is important to be able to look to a struct definition and be aware what interfaces in the code base are supported.