a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment by rob05c
rob05c  ·  3255 days ago  ·  link  ·    ·  parent  ·  post: Go Is Unapologetically Flawed, Here’s Why We Use It

    What is it that is making Go so popular, or sets it apart from other languages?

It's as fast as C++, easy to write as Python, highly parallel, and created by a popular company.

    what exactly is Go for?

It's primarily a systems-level language for things like back-end web services. It's fast enough to replace C++, but easy enough to write that Python and Ruby programmers like it.

To give you a better idea, they have a great tutorial to make a wiki in about an hour. My biggest Go projects have been an online multiplayer text game server (a MUD), and a service to manage schedules for electrical switches for power distribution systems. It worked well for both; though I hit the metaprogramming wall with the MUD.





zedadex  ·  3254 days ago  ·  link  ·  

    though I hit the metaprogramming wall with the MUD

What metaprogramming wall?

rob05c  ·  3254 days ago  ·  link  ·  

Specifically, lack of macros. Though Go's reflection and other metaprogramming paradigms also suck.

I had a pattern that was repeated everywhere involving both a continue and a return. Which is impossible to convert to a function; it has to be a compile-time macro. Which Go doesn't have. I put as much as I could in a function, but it still ended up being about 6 duplicate lines, repeated everywhere, which were literally impossible to abstract.

That said, that was before Go added go generate. I've yet to play with go generate, but I think I could use it to abstract the duplicate block. Though it's a pretty ugly way of doing it.

ironpotato  ·  3255 days ago  ·  link  ·  

I was previously attempting to write a MUD in python... it's no picnic either. So I decided to use the language I know best C... So far... things are okay.

Kerbobotat  ·  3254 days ago  ·  link  ·  

Thanks for the indepth, fantastic reply!

Ill definitely give Go a look, having a browse through the wiki tutorial right now, Ill admit some things are very strange to me after spending months bashing c syntax into my head for college but it seems easy enough to get to grips with. Now to find a project I can use go for :)