Live data from Hacker News

Go is boring

aeronotix.pl

41–50 of 138 posts

Re: Go is boring

#41
post #33

This sounds really interesting and compelling. As someone new to Go... What would be the advantages of using Go over Python (taking into account the emergence and future ascendancy of pypy)?

On the surface they feel similar in that they are both quite concise.

Concurrency is a hugh difference. Python's approach to concurrency is the "global interpreter lock" which means only one thread can be running at once to prevent you from trying to access shared objects from multiple threads. Go has lite weight "go routines" that are multiplexed across os threads in parallel and channels that can be used for passing variables between them and the defer statement to help clean up. This sounds complicated at first but it is the simplest system for reasoning about concurrent code I have used.

Go also has pointers, mutexes, fixed sized arrays (with easy to use dynamic slices over them) and other things that let you implement low level data structures when you need to.

Go has interfaces and embedding but no inheritance which leads to iterative development of organization instead of needing to design from the start. The standard library makes extensive use of these and is extremely well organized...I much prefer go's http client code for example.

It doesn't have as extensive a corpus of library implemented in optimized C/fortran and I really miss things like numpy...in many cases python code can be faster because the libraries do all the heavy lifting.

Re: Go is boring

#42
post #24

I love static typed language. With a proper IDE, code navigation, completion work like magic. I end up doing less typing than the dynamic typed language. Have you ever tried to auto complete the 'init' function in RubyMine? It will ask you which one of the 100 init functions do you mean. :) Not with static typed language. There is only one init function to choose from because the IDE knows the exact type you are work…

Which IDE do you use with Go?

I use Sublime Text 2 with GoSublime.

http://www.sublimetext.com/ https://github.com/DisposaBoy/GoSublime

Re: Go is boring

#43

I've tried giving Go a try a bunch of times now. My primary choice of language is Haskell and I just can't seem to get excited about Go.

Would you say your interest in programming languages is largely academic in nature? I get the impression that Haskell mostly (for now at least) fits best with academia, Java/C# for enterprise, python/ruby for smallish web apps, Go/C/C++/Java for industrial applications (like servers, etc). There is a very real possibility that Go is just not the right fit for you with your current requirements. No language is the rig…

Haskell isn't just used in academia. It's used a Facebook for example, and no-one would accuse Facebook of being an academic company.

Re: Go is boring

#44

The author makes valid points and some of the reasons why I tested Go recently are named, but when it was ~15x slower than Perl and 10x slower than Java on some simple regexp matching, I gave up on it.

With other simple regular expressions Perl and Java will be millions of times slower than Go: http://swtch.com/~rsc/regexp/regexp1.html

Re: Go is boring

#45

I've tried giving Go a try a bunch of times now. My primary choice of language is Haskell and I just can't seem to get excited about Go.

Would you say your interest in programming languages is largely academic in nature? I get the impression that Haskell mostly (for now at least) fits best with academia, Java/C# for enterprise, python/ruby for smallish web apps, Go/C/C++/Java for industrial applications (like servers, etc). There is a very real possibility that Go is just not the right fit for you with your current requirements. No language is the rig…

And C/C++ is by developers to implement Java, C#, Python, Ruby, Go, C, and C++. :)

Re: Go is boring

#46
post #3

Earlier quoted context omitted.

Yes. I can't agree more. One example to backup: Eclipse makes Java fun.

Is this sarcasm? =) If you want to know how real auto-complete works, try out IntelliJ. Auto-complete on Eclipse is like slowly being pecked to death by ducks. A more accurate statement in my mind is "Eclipse makes Java palpable, IntelliJ makes Java fun."

I am downloading IntelliJ. I've use Eclipse for years, It works for me.

I will give Eclipse a try.

Re: Go is boring

#48
post #12
post #10

Earlier quoted context omitted.

> Not even in computer science; What did you specialize in? It's pretty easy to hit upon co-routines, if you have an interest in Scheme or even Haskell. But I can imagine, it's much harder if you are into, say, the innards of database schemas. (Just a random example.)

I don't know why I didn't come across it. Maybe if I took Operating System II ..

It's not surprising you didn't come across it -- I never did in school either. From what I can tell, it's because coroutines were an old idea that were eclipsed by OS threads and the like. They basically became interesting again when OS threads reached scalability limits.

This paper by the authors of Lua has some good historical background:

http://lambda-the-ultimate.org/node/2868

They also poke fun at Python in some ways because the coroutines are fairly limited. Python got them sort of ad hoc with yield in Python 2.4 and send() in Python 2.5. I think Python is by far the most popular language with any kind of coroutine. Coroutines aren't very popular or well understood.

Re: Go is boring

#49
post #46

Earlier quoted context omitted.

Is this sarcasm? =) If you want to know how real auto-complete works, try out IntelliJ. Auto-complete on Eclipse is like slowly being pecked to death by ducks. A more accurate statement in my mind is "Eclipse makes Java palpable, IntelliJ makes Java fun."

I am downloading IntelliJ. I've use Eclipse for years, It works for me. I will give Eclipse a try.

IntelliJ is the best IDE out there. It might be pricy, but it will save you so much time in the long run. Since time is money, you will end up saving money too. :)

Re: Go is boring

#50
post #13

Earlier quoted context omitted.

Static typing also makes overloading your f.unctions on return type instead of just arguments types possible. Not a lot of languages do this, though. I only know of one, but it's invaluable there.

Perl's a dynamic language, but return type can vary based on context. I once saw this really bite someone where the presence of parentheses on the left-hand side of the expression changed the behavior of the function being called on the right-hand side. Not fun to debug that one.

Exactly. Duck typing sucks. I don't know why it was invented...
Post reply on HN