News for hackers. Stuff that matters.
Re:Less is exponentially more (2012) by danieldk on Friday September 20, 2013 @09:41AM (#6417612)
So specifically, I'd be interested in hearing something from an expert C++ programmer

I don't know what qualifies as an expert, but as someone who is using C++ and Java (and did look at Go):

- If I want a garbage collected language that is reasonably fast and safe, I prefer Java over Go, since there are many high-quality libraries available, there are good IDEs, it's easy to instrument the JVM (heck, I can even debug a remote application running in Tomcat in my IDE), and has a good central repository and package manger (JVM). Go is hardly more expressive than Java, so if I am looking for a replacement, it will probably be Kotlin or Scala.

- There are applications where I want manual memory management, auto-vectorization, real generics (templates), etc. Go has none of these features.

In other words: Go does not offer me any advantages over Java or C++. At the same time, moving from Java to Go would require me to sacrifice a lot of well-developed and reliable tools and libraries. I know that someone is going to mention Goroutines and channels. There are great concurrency options for Java as well, e.g. Akka, which implements actors, futures, a scheduler, remoting, and clustering. In comparison Go's concurrency offering is quite pale. Sure, you could implement something like Akka on top of Go, but it currently does not exist (except for a binding against Erlang's C node functionality).

Re:Less is exponentially more (2012) by jawr on Friday September 20, 2013 @10:01AM (#6417723)
The problem that I find with Java is that it forces you to write code in a certain way; OO programming seems to have become the de facto way of dealing with large problems, especially in enterprise and sometimes I think far too much time is given to design patterns (that do work in a /lot/ of cases) and how they can be shoe horned into the program you are making. Java does have some amazing features, libraries, etc. It also has a lot of security flaws (afaik). Also, IDE's really do not interest me in the slightest.

Writing in Go isn't as strict or structured as Java which I really enjoy. I used to write a lot of C++ and although I was never a pro, I did really used to enjoy programming in it. Go is certainly a breath of fresh air to develop in in comparison and I find that I can write more concisely and if anything performance seems to improve as I am not making trivial mistakes that "powerful" languages like C++ allow me to repeatedly make. KISS.

As always, it's horses for courses.

Re:Less is exponentially more (2012) by lmm on Friday September 20, 2013 @10:17AM (#6417815)
Java is deliberately simplistic because it prioritizes code maintainability (even by mediocre programmers), but I thought that was the same philosophy as go (e.g. limited type system). And I don't know what you're talking about wrt security.

Have you tried a modern, expressive, strongly typed functional language like Scala or Haskell? I can well believe that go would be an improvement over Java, but Java's not exactly state of the art these days.

Re:Less is exponentially more (2012) by jawr on Friday September 20, 2013 @10:38AM (#6417960)
I'm not sure I would call Java simplistic.. It seems incredibly bloated to me especially in comparison to Go and other languages.

With regards to security issues, I was under the impression that since oracle took it over, Java has had prevalent issues that have just been ignored by Oracle. Quick search seems to agree..

I have played with Haskell and really enjoyed the language. Although imperative languages are my bread and butter it certainly gave me a different approach to programming, primarily stepping away from an OO design and love of recursion!

Re:Less is exponentially more (2012) by cytzol on Friday September 20, 2013 @11:11AM (#6418183)
I would call Java simplistic, but for a funny reason: with other languages, you can do things the straightforward way using basic constructs, or you can do things the expert way using a variety of more complex (sometimes user-defined) constructs. With Java, you have to do things the simple way. Sure, you have to define a class with a main method in it instead of just being able to print "Hello World", but there's one less way to do that in Java than in scripting languages.

Haskell is a lovely language and everyone should dabble in it for a while, for that very reason: because it makes you look at programming differently.

Re:Less is exponentially more (2012) by lmm on Friday September 20, 2013 @10:47AM (#6418021)
You're probably thinking of security issues with the browser plugin? They're... unfortunate, but don't affect the language as it's actually used. Don't write java applets, and as a user, don't install the browser plugin.
Re:Less is exponentially more (2012) by Agathos on Friday September 20, 2013 @11:40AM (#6418396)
Indeed. Java in a sandbox in the browser is pretty much a failure. But there is no Go browser sandbox at all, so I'd hardly say Go is better off here. I guess you look better when you don't make the attempt at all.
Re:Less is exponentially more (2012) by asdasf on Friday September 20, 2013 @01:19PM (#6419096)
>but Java's not exactly state of the art these days.

Nor was it when it was created. It was born outdated (just like go!).

Re:Less is exponentially more (2012) by consultant23522 on Friday September 20, 2013 @11:44AM (#6418421)
Your comment really scared me when you talk about not liking strict or structured code. I maintain a lot of legacy code and one of the things that bother me the most about the C/C++ code I work on is the complete lack of organization. Because there's no strong conventions built into the language on how to organize things, people just sort of do it willy nilly. Wanting to do a serious refactor is a nightmare of grep and other crap. Java's packaging at least encourages some level of code organization and grouping of similar functionality. Could you organize things well in your C/C++ code? Of course. But it seems to not happen. That's not to say that all the Java code I've maintained has been well organized, but it's leaps and bounds better than the C/C++ stuff.
Re:Less is exponentially more (2012) by jawr on Saturday September 21, 2013 @10:11AM (#6422971)
I'm not trying to suggest that /all/ code shouldn't be structured; it's all dependent on what you are writing. I have contributed to a decent sized C++ ftpd program (https://github.com/jawr/ebftpd) and it is well structured in my opinion. Go can be well structured too, it just seems to approach it in a different way. As I said before, it's horses for courses.