News for hackers. Stuff that matters.
Re:400 days of Go by qooleot on Tuesday September 15, 2015 @08:27AM (#10220196)
"Well, Java isn't verbose."

Maybe its just the code I've read, but its generally much longer than other languages to accomplish the same thing. A bunch of little things add up, such as "extends" instead of ":" for inheritance. Naming things is often longer - maybe its not the language core itself, but a counter example is python coding standards keeps them much shorter. With Go, there's duck typing to not have to declare obvious types (such as for strings).

The goals of the programs in enterprise java apps probably differ by an emphasis on readability and not writing speed. I.e. lambdas are written quicker to write, but maybe a reader would understand a strategy pattern's goal quicker.

Re:400 days of Go by arihant on Tuesday September 15, 2015 @11:24AM (#10221154)
Java programs got that way not because of language, but because teams of thousands of developers managing same codebase for decades. Explicitness and non-magicness are extremely valued in that environment.

Imagine you're refactoring a code written by employee #12340 that was written 10 years ago. With Go, you'd go file after file decomposing the program to finally figure out that if he just used a word to implement an interface, you only had to read that file and a javadoc. Long class names are still easier to look than signatures of functions.

Java emphasises abstraction. Go emphasises composition. Both have its uses, but what I was refuting was people claiming that Go is better than Java which I think is extremely uninformed conclusion.

Re:400 days of Go by chrisbroadfoot on Tuesday September 15, 2015 @04:10PM (#10222855)
> Explicitness and non-magicness are extremely valued in that environment.

This is not my experience with Java programs.

Enterprise Java programs often have many layers of magic abstraction, like Aspect-Oriented Programming, dependency injection, IOC.

Furthermore, people love using configuration files over code to determine program behaviour (see servlet configs, etc).

Re:400 days of Go by mahmoudimus on Tuesday September 15, 2015 @05:58PM (#10223434)
If you had said this comment 5 years ago, I would agree. I think you should take a look into today's Java development environment. It's world class, and light-years ahead of anything else out there.
Re:400 days of Go by chrisbroadfoot on Thursday September 17, 2015 @02:57AM (#10231957)
Good to hear. I haven't programmed in Java in about that much time :)
Re:400 days of Go by joshuacc on Tuesday September 15, 2015 @10:30AM (#10220817)
> With Go, there's duck typing to not have to declare obvious types

Not a Go developer, but I think you mean type inference, not duck typing.

Re:400 days of Go by stonemetal on Tuesday September 15, 2015 @11:05AM (#10221052)
Not really, Go uses duck typing for interfaces. You declare an interface to require functions X, Y, and Z. Any type that has functions X, Y, and Z suddenly implements that interface whether you want it to or not.
Re:400 days of Go by joshuacc on Thursday September 24, 2015 @02:13PM (#10273443)
As I understand it, the correct term for that is "structural typing." Duck typing is similar, but applies exclusively to dynamic languages. See: https://en.wikipedia.org/wiki/Duck_typing#Structural_type_sy...