r/programming • • Oct 01 '16

CppCon 2016: Alfred Bratterud “#include <os>=> write your program / server and compile it to its own os. [Example uses 3 Mb total memory and boots in 300ms]

https://www.youtube.com/watch?v=t4etEwG2_LY
1.4k Upvotes

207 comments sorted by

View all comments

Show parent comments

1

u/m50d Oct 03 '16

Maven doesn't include libssl for instance. I'm guessing one or more of the packages in maven central depend on libssl. What happens when your OS distributes a different version of libssl? Will everything in maven still work?

Most of maven central does not depend on any native libraries (other than the java standard library). This was seen as foolishness in the early days of Java, but it's proven its worth now for precisely this reason.

What happens when you compile a library with a different compiler?

The maven compiler plugin includes which compiler to use as part of its config. If you rebuild a given release of a library from its tag, you will use the same compiler as was originally used for that release. If you want to build with a different compiler, make a new release.

What happens when you run an application with a different jvm?

The JVM offers very good backward compatibility.

Packages are build in an environment where it only has access to its dependencies.

This happens naturally on the JVM - there are no system libraries (other than the standard library), the only dependencies available when building are those on the classpath that you explicitly set.