5 ms·
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 lar
by jawr 13y ago
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.
- lmm 13y agoJava 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.
- jawr 13y agoI'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!
- lmm 13y agoYou'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.
- Agathos 13y agoIndeed. 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.
- cytzol 13y agoI 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.
- asdasf 13y ago>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!).
- consultant23522 13y agoYour 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.
- jawr 13y agoI'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 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.