Earlier quoted context omitted.
You see the JVM as an asset. Many consider it a liability. And programmers in the New Jersey school (see Worse is Better) are unlikely to ever stomach Clojure. These differences are more in the realm of deep allegiances and HN comments will probably be limited to revealing allegiances--they have little chance to sway the reader one way or the other. Might as well say, "MIT type with love for the JVM? Choose Clojure.…
I realize I've started a pretty ridiculous language war; that was not my intent. But I still cannot understand why anyone would want to use a language that is mostly meant for non-constrained environments, does not provide some major productivity advantages over JVM languages while being slower than JVM languages. I would totally consider using use Go if it targeted the JVM. You say some people consider the JVM a lia…
Why I Program in Go
101–110 of 171 posts
Re: Why I Program in Go
#102Earlier quoted context omitted.
> The only reason you hear less "crazy" Go GC stories is because Go has never been tested as much as the JVM under different application requirements. It is definitely true that the JVM had been thoroughly road tested compared to Go, but your conclusion is unsound. Go was designed to specifically avoid this pitfall.
Really? I remember reading all kinds of problems when trying to run go on 32-bit machines, like: http://news.ycombinator.com/item?id=3805302
Re: Why I Program in Go
#103Earlier quoted context omitted.
No... It's because Java totally sucks when objects go from Eden to Survivor and then needs to be GC'ed or from Eden to Survivor to Tenured and then needs to be GC'ed. That's the very reason why some trading companies who still insist on using Java do use methods where as few objects as possible are ever created and went on to invent things like the LMAX disruptor "pattern" (more like an anti-pattern, where the goal i…
I'm not dismissing Go, and I'm not praising Java, and I've even admitted on this very thread that Go is better than Java, so there's really no need in trying to convince me of anything. All I'm saying is that Go isn't good enough -- if I really want fast development and expressivity, there are languages more expressive than Go (more so than Go is to Java), and if I really need top-notch performance, then Java is OK a…
Re: Why I Program in Go
#104I am C and lisp fan and think OOP as non-sense. I used python a bit but hate its performance. Can I still get something from Go that can not be provided by C and lisp? Does go provide great flexibility by C and lisp? BTW, I think emacs is the best IDE so I do not care any tools/IDEs at all.
Go is a bit like C but it has GC so it depends on how much you value the fine degree of control of memory allocation that you get with C. Personally I think Go has a lot cleaner syntax than C and the tools give a lot more "friendly" error messages when compiling your applications. You do still get nullpointerexception runtime errors though but that's an inherent problem with the nil/null type.
I have only three real things to care about a language:
1. Performance and thus optional strong typed is required. Go can have optional strong typed system, so performance may be improved in future, but its GC seems a big warning for me. I want to have option to allocate/free memory myself. the GC is also an enforcement of some design principle, which is also a big minus regarding the next point.
2. Great flexibility, basically the language should not make any decisions for developers. I dislike C++ for its OOP approach to make way too many decisions for developer. I want no limitation from a language. I can self restrain to avoid all troubles from freedom, I can design OOP/GC myself if it is neccessary, but please not make decision for me. (C++ did not enforce OOP, but most of the extra part beyond C usually distorts a good design otherwise) Lisp and C are almost perfect here. Does GO allow any weird design people may think of? any enforcement of some supposed-to-be good principle?
3. A script, which can relieve me on all details. Occasionally, I may not care performance, and I want life easy. Python is prety good here. Lisp is good but lack of compiling on ARM machines is a big disadvantage.
Re: Why I Program in Go
#105Those are many of the same reasons I program in Go. To add another: * Go's build tools and the language's overall approach to building projects are fantastic. For the vast majority of projects you don't need an external build manager like make. One of my least favorite bits of programming in C and C++, even when I was doing that on a daily basis years ago, was the huge morass of make/autoconf hell that would grow up…
With Go open source projects (on git, svn, mercurial) much of the time you can just And have absolutely no version management or any way to indicate API changes (except for making a new repository for every API-breaking change).
Not having version management is a real concern, but I solve that problem by forking the projects and updating manually as needed. Ubuntu and debian are soon going to be allowing you to install go packages with their package management systems if I'm not mistaken.
Re: Why I Program in Go
#106Programming in Go, once it clicks, really does feel relaxing and productive. If you're a decent Node.js programmer, it's like stepping up to "Node Pro", in the sense that you work close to the metal with your web server so everything feels clean and easy to wrap your mind around.
But Go code is cleaner and tighter. The code formatting conventions contribute to that greatly, as well as the fact that you just don't have to pull in as much 3rd party code because so much functionality is already beautifully integrated.
There are a lot of positives about Go that reveal themselves over the first couple days of coding in it.
I do wish the documentation convention included not only a brief description each function, etc., but also a brief example.
By the way, I also evaluated Scala for a few days before settling on Go as my preference. I like Scala, but it quickly becomes a sprawling language as your explore it further, and frameworks like Play and Lift bring even more baggage along for the ride. The core language, on its own, was attractive, but overall, the experience just didn't have the compact, robust, completely under control, and nimble feeling that came with Go.
Oh ya, and the Go syntax felt ugly and awkward at first. That feeling quickly faded after a day of use, but it's worth mentioning because I bet it turns some people away from Go before they even get to the great parts.
Just my 3 cents worth.
Re: Why I Program in Go
#107Earlier quoted context omitted.
I have a hard time believing anything can beat or even match the garbage collection performance of the JVM. Not that there is something special about the JVM, just that there have been _so_ many smart people working on the problem for so long now. And for good performance doing server tasks (ie, not computational tasks) exceptional GC is a must. Can a GO program handle a workload that creates tens/hundreds of thousan…
Remember Go doesn't have objects, it only has structs which are most likely (and should be, but I haven't verified) much lighter weight than the objects you might be used to in Java. As far as the creating tens/hundreds of thousands of structs per second for weeks or months without leaking memory, I'll get back to you on that once my code has been active that long ;)
Re: Why I Program in Go
#108Earlier quoted context omitted.
You need to be commended for defending Go. I don't think the Go developers hide the fact that they mean go as a Systems level programming language. It has higher level features, but the developers don't really mind the fact that Go isn't going to be delivering a whole lot of high level features. Maybe if they come in the form of libraries... Funny thing about Go is that as a compiled language, folks often need to sen…
Funny thing about Go is that as a compiled language, folks often need to send the source-code to the deployment servers to compile on them too. I seem to recall that deployment servers shouldn't need to have development tools which were themselves exposing the servers to bad intention by bad folks. It's just hard to keep the separation I guess. This is what systems administrators with grey beards thought in the 1990s…
Re: Why I Program in Go
#109Earlier quoted context omitted.
You see the JVM as an asset. Many consider it a liability. And programmers in the New Jersey school (see Worse is Better) are unlikely to ever stomach Clojure. These differences are more in the realm of deep allegiances and HN comments will probably be limited to revealing allegiances--they have little chance to sway the reader one way or the other. Might as well say, "MIT type with love for the JVM? Choose Clojure.…
I realize I've started a pretty ridiculous language war; that was not my intent. But I still cannot understand why anyone would want to use a language that is mostly meant for non-constrained environments, does not provide some major productivity advantages over JVM languages while being slower than JVM languages. I would totally consider using use Go if it targeted the JVM. You say some people consider the JVM a lia…
Re: Why I Program in Go
#110Go nails code readability and documentation better than any other language I'm aware of. For example, look at the package documentation for Go's list data structure at http://golang.org/pkg/container/list/ . 5 seconds of reading this you immediately get what the package does and how to use it. Now let's say you want to know how the list is implemented. No problemo. Click the package files link list.go, http://golang.…
> Go nails code [cut] documentation better than any other language I'm aware of. That's because you haven't seen PHP's documentation. Look at your Go's list example. It doesn't even show how to create a list and fill it with items. It doesn't have users' comments. It doesn't explain much about the data structure. Can it be a circular doubly link list, for instance? Is there a method to empty the list, or quickly inse…
If all of the docs are written by go developers/contributors who know that the code in examples should be consistent, then all those bad habits aren't ingrained in new users.
Something golang has that I don't know anyone else has is this:
http://talks.golang.org/2012/concurrency.slide#1
Also another thing about Go, is the source code for each of those packages is extremely easy to understand... it's truly self documenting... there's also the option of looking at the list_test.go file.
I will admit a method to empty the list as well as insert more than one element would be nice.