Live data from Hacker News

The State of Go

talks.golang.org

221–230 of 402 posts

Re: The State of Go

#221
post #218

Question: who is going to remember all these conversion rules? By the second bullet you lost me. Simply run the command below: go tool fix -diff -force=context state-of-go/tools/gofix.go How is typing 59 characters simple?

How lazy are you?

I also hate any command that has more than, lets say 3 spaces, for its complexity, but hopefully this conversion stuff is more or less just a one time job so: who cares ;-)

Re: The State of Go

#222
post #172

Earlier quoted context omitted.

Normally it's the other way around, Go gets compared to other "Systems Programming" languages because somehow services got lumped in with that name over the last few years. To me they're very discrete things, if you can't manually manage memory(raw pointers and the like) then it's not a System Programming language.

> To me they're very discrete things, if you can't manually manage memory(raw pointers and the like) then it's not a System Programming language. Having a GC doesn't forbid that, in very specific cases. Mesa/Cedar, Modula-2+, Modula-3, Oberon, Oberon-2, Active Oberon, Component Pascal, System C#, Swift, D are all examples of such languages.

Rust, too, had an optional GC (where the choice is per-data, not global) for a long time and still intended to be a systems language (And was pretty successful at being systemsy IMO). I think there was a time when &-pointers didn't exist and all sharing was done through the GC too. At one point there was a realization that the new borrowing system could be used to write GC-less programs pretty easily, and that was a turning point after which the GC started being phased out in community usage and eventually removed from the language.

Re: The State of Go

#223
post #210

Golang really seems to have come a long way. But what holds me back from using it are the dangers of deadlocks and segfaults (due to forgotten error handling) that might be introduced even inadvertedly if applied to industrial-scale projects (say, 1M+ LOC, 10+ developers). That is, I see many small (server/microservice) projects flourish with Golang, and it seems an excellent replacement for certain types of C projec…

It's even easier to mishandle errors and get deadlocks in C++. That is in addition to all sorts of other fun like buffer overruns. If the team is capable of not messing these things up in C++, then they are more than capable of not messing up in Go.

Re: The State of Go

#224

Earlier quoted context omitted.

For me Go is the goto language for usecases where Python and Java were used. Python is great for tooling, and Java was the primary language for the backend. So now, whenever i think about tooling or backend, Go is the primary answer, because its good in both paradigms. The other languages i use is C++, and Swift, each one with their own niches. C++ for complex machinery, that requires more control and integration wit…

One nice thing about the "rewrite C++ in Rust" is that oh can do it incrementally; we're taking the same approach for Firefox, for example. Out of curiosity, what are the libraries in C++ that you miss in Rust, or would have to re-write?

For me C++ (or Rust) would be the languages to go for Browsers, VM's, Compilers, Game Engines, Glue Code for a OS(platform layer to prepare things for a app to run) etc..

The problem is, there's a lot of code in C++ already for all of this. V8, Dart, Java Vm's in C++, Webkit, Chrome, Firefox in C++, great game engines in C++.

Is not that i wouldnt use Rust.. on the contrary. But the problem is, for the usecase i think Rust would be very good, there are a lot of code in C++ already, that would require a effort of years to port in Rust.

For instance i work in Chrome C++ source a lot.. and the codebase is a beast.

Maybe if, in the future, things that are starting now in Rust, will be the the successful cases for this kind of machinery.

But given that, at least i, wouldnt use Rust to make a webserver backend (the same way i wouldnt use C++ for that), because i think its overkill. While i like Rust, i cant see a opportunity to use it, and the great impediment for that, is the C++ codebase legacy, and both languages basically competing for the same paradigm.

But theres a great thing in favor of Rust, because its the only modern real contender to C++. But i think it will be a slow and harsh competition (albeit a necessary one).

Re: The State of Go

#225
post #166

Earlier quoted context omitted.

I think you have this backwards. 'Systems programming' has never meant 'operating systems'. To believe that Go is misdescribed as a 'systems programming' language you have to believe Rob Pike doesn't know what 'systems programming' means.

Perhaps you could help clear up the misconception by fixing Wikipedia's 'System Programming' and 'System Programming Language' entries. It might also be worth commenting on these[0] Stack Exchange answers, too. [0] http://softwareengineering.stackexchange.com/q/151610/54726

Why would I? They support what I said directly - 'system programming' is not limited to operating systems. Here's a bit from one of the Wikipedia entries you mention.

"System software is computer software designed to operate and control the computer hardware, and to provide a platform for running application software. System software is computer software designed to operate and control the computer hardware, and to provide a platform for running application software. System software includes software categories such as operating systems, utility software, device drivers, compilers, and linkers."

Re: The State of Go

#226

Earlier quoted context omitted.

> When I moved from Python to Go not only did my code become more safe, I actually became a better programmer. This is probably more due to the fact that you moved from a dynamically typed language to a statically typed one rather than this new language itself.

But Go really does encourage good practices. I came to Go after programming in C, C++, Java and a bunch of dynamically typed languages. After a couple of years with Go I returned to C (and a bit to Java). And I'm writing better code in those languages now. Now, part of it is natural progress probably. But especially when I'm writing C, I can tell that I'm writing it much better than before because I'm adopting back s…

Is there a good resource where those good transferable go idioms are written? I dont think I will have time to learn go anytime soon, but would definitely spent time with an article or something like that.

Re: The State of Go

#228
post #172

Earlier quoted context omitted.

Normally it's the other way around, Go gets compared to other "Systems Programming" languages because somehow services got lumped in with that name over the last few years. To me they're very discrete things, if you can't manually manage memory(raw pointers and the like) then it's not a System Programming language.

> To me they're very discrete things, if you can't manually manage memory(raw pointers and the like) then it's not a System Programming language. Having a GC doesn't forbid that, in very specific cases. Mesa/Cedar, Modula-2+, Modula-3, Oberon, Oberon-2, Active Oberon, Component Pascal, System C#, Swift, D are all examples of such languages.

I never said anything about having a GC, just that if you can't poke directly at memory when you need to then you're going to have a heck of a time working on the Systems Programming space.

Re: The State of Go

#229

Question: who is going to remember all these conversion rules? By the second bullet you lost me. Simply run the command below: go tool fix -diff -force=context state-of-go/tools/gofix.go How is typing 59 characters simple?

`staticcheck` will statically analyze your code and suggest all places where the new conversion rule can be applied. All the other rules are same as the last 7 years, you know them through experience after using Go for a week. Way simpler than most other languages. That go fix command can be typed once and update millions of lines of code. Pretty simple.

These rules intimidate me (I don't know Go).

You also meant to say the go fix command does a lot (which is great), not that calling it is simple (which is not great).

Re: The State of Go

#230

Earlier quoted context omitted.

Normally it's the other way around, Go gets compared to other "Systems Programming" languages because somehow services got lumped in with that name over the last few years. To me they're very discrete things, if you can't manually manage memory(raw pointers and the like) then it's not a System Programming language.

Go gets compared to "systems programming" languages because its designers specifically intended it to be used as such [1][2], albeit the definition of 'systems' they are using is deliberately evolved from the original shade of meaning as suggested by low-level languages that are sometimes deemed to be for 'systems programming' to illustrate that the nature of environments has changed, and a new approach is advantageo…

If its a "new environment" doesn't imply that it can't be systems programming?

I totally agree that Go is fantastic for services and networked things.

Post reply on HN