Arc Forumnew | comments | leaders | submitlogin
2 points by akkartik 1732 days ago | link | parent

That makes sense. I think my criticism is really for Guice, which has the effect of making Java a dynamically typed language that can throw type errors at run-time. But if you start out with a dynamic language like Lisp, dynamically-scoped variables are much more acceptable.

Regarding the term "injection", I'm following https://en.wikipedia.org/wiki/Dependency_injection. It feels like a marketing term, but now we're stuck with it.



2 points by shader 1730 days ago | link

Why are runtime type errors acceptable in Lisp but not in Java? Or was there some other reason for dynamically-scoped variables to be acceptable in Lisp?

-----

2 points by akkartik 1729 days ago | link

This side is definitely not absolutist. In my opinion, Java started out encouraging people to rely on the compiler for type errors. We got used to refactoring in the IDE, and if nothing was red we expect no type errors.

With a dynamic language you never start out relying on the compiler as a crutch.

This argument isn't about anything directly technical about the respective compilers, just the pragmatic thought patterns I've observed..

-----