News for hackers. Stuff that matters.
Re:Printf(“%s %s”, dependency, injection) by bobmaxup on Tuesday October 19, 2021 @06:34AM (#28916670)
How is any of this particular to Java or Go?

What does eXtreme Programming or Agile have to do with how you pass messages in code?

Re:Printf(“%s %s”, dependency, injection) by fredrikholm on Tuesday October 19, 2021 @06:36AM (#28916682)
I've yet to be in a large, enterprise Java/C# project that doesn't subscribe to this style (seen roughly 10 of these projects at 3 companies).

Perhaps it's something about my area, but this style is standard idiomatic Java/C#.

EDIT: And the opposite statement is (perhaps more) true for Go. Adopting IBeanProxyFactory-type of stuff in there is beyond unidiomatic.

Re:Printf(“%s %s”, dependency, injection) by xh-dude on Tuesday October 19, 2021 @04:10PM (#28923107)
Because passing messages still means dispatch on concrete types - something concrete sends a message, something concrete receives a message. That’s the whole ballgame - get one concrete type to talk to another. Even if ‘concrete’ is in a seemingly typeless language, we can Hindley-Milner our way down to this.

I think it’s telling that Go, Rust, as well as more inspired stuff in later editions of C++/Java/C# all seem to be demonstrating that nominal inheritance-first polymorphism is not the only or always the best maze of abstraction for getting to a concrete dispatch from type A to type B in imperative-feeling languages.