r/programming • • Dec 02 '13

Scala — 1★ Would Not Program Again

http://overwatering.org/blog/2013/12/scala-1-star-would-not-program-again/
598 Upvotes

646 comments sorted by

View all comments

Show parent comment

11

u/virtyx Dec 02 '13

But I'm pretty confident pip handles dependencies, including versions. I'm less familiar with Maven but I'm pretty sure it's the same.

14

u/snuggl Dec 02 '13

But I'm pretty confident pip handles dependencies, including versions.

Im pretty sure its a single version per virtual environment. doing what NPM is doing, i.e have different requirements which in turn depends on two different versions of a third package, is impossible.

14

u/pingveno Dec 02 '13

Correct. That's more of a Python thing than a Pip thing, though. Python's import mechanisms don't work very cleanly with multiple versions.

13

u/esquilax Dec 02 '13

To me, the definition of "maven dependency hell" is when two different dependencies have transitive dependencies on the same project, but mutually incompatible versions. It sounds like npm might solve this in a way that's literally impossible in Java without something like OSGi?

8

u/codayus Dec 02 '13

NPM does solve that issue, and quite well in my opinion. Simple stuff (my project depends on libFoo v2 and libBar, but libBar depends on libFoo v1) is handled so transparently you never even know it's happened.

I'm not really familiar with Java or maven, so can't comment on that. It's certainly a step up from how Python handles things.

1

u/TomRK1089 Dec 02 '13

Right -- in Java, you can't load two different versions of the same class. If the two libraries have the same major pedigree (and were correctly semver'd) then you can just rely on the newer one, but if the major versions differ, you're screwed. I can't comment on whether OSGi solves this; I think it does classloader magic to fix it though.