
Low Hanging Fruit of Programming Language Design - adamnemecek
http://250bpm.com/blog:112
======
cousin_it
Looking at the paper, it seems like most of the duplication is coming from
folks who commit copies of library code into their repos. I think there are
valid reasons to do that, and anyway it's not something that can be solved by
programming language design.

Apart from that, most of the duplication is auto-generated project skeletons
for frameworks like Django or Angular. I dislike frameworks as much as the
next guy, but there's value in having a standard folder structure across
different projects. So not a case for programming language design either.

Another widespread case of code generation that wasn't covered in the post is
cross-language definition of structs or APIs. That's also not a case for
programming language design, because the whole point is interoperating between
languages.

In summary, we don't yet have a strong idea how analyzing code duplication or
generation can lead to better programming language design. The conclusion
might still be true, but you need to work a bit harder for it.

------
AnimalMuppet
> In Java, 70% of duplicates were due to code generation. For C++ is was 18%,
> for Python 85%, for JavaScript 70%.

C++ is the real outlier there. That could be because C++ code is much harder
to generate, but I don't buy that it's _that_ much harder than Java. Or it
could be because C++ templates aren't considered "code generation". Or it
could be because C++ doesn't get used for projects with that much boilerplate
code. Or...

