118 points · by melzarei · 8y ago · 70 comments
if you're interested, there's a series of articles explaining how modules work here: https://research.swtch.com/vgo
Getting started with a Go project is now easier and faster - install go runtime, clone, run a command to install dependencies, build & run. No more need for a go specific file structure (although I guess it'll still help if you're doing professional development)
I'll be interested to find out more about interactivity with the rest of the javascript world via syscall/js.
From the release notes:
> Go programs currently compile to one WebAssembly module that includes the Go runtime for goroutine scheduling, garbage collection, maps, etc. As a result, the resulting size is at minimum around 2 MB, or 500 KB compressed.
The minimum size is a bit unfortunate, but after all it is still just experimental.
WASM has significantly less parse penalty than javascript. A larger bundle size than your accustomed to with pure js is not necessarily a problem.
https://blog.figma.com/webassembly-cut-figmas-load-time-by-3...
https://hacks.mozilla.org/2018/01/making-webassembly-even-fa...
Maybe they can use some DCE to get it smaller, idk. Go binaries have never been that small so I have my doubts, but hopefully!
EDIT: I see the release notes now that says 500k compressed. That's much better. I didn't realize webassembly could be compressed, is this just gzip?
(Of course that would open up all the sorts of issues that static compiles get rid of.)
You can also use C or Rust and avoid GC altogether. Rust produces very small WASMs
https://hardware.metrics.mozilla.com/#goto-os-and-architectu...
To be clear, Mozilla dropped support for XP and Vista in Firefox's regular "rapid release" channel; XP and Vista users were migrated to the Firefox ESR channel in March 2017 and will continue to receive ESR security updates until this September. Microsoft ended support for XP in 2014 and support for Vista in 2017. Chrome dropped support in 2016.
https://support.mozilla.org/en-US/kb/end-support-windows-xp-...
Because people deploy Go on Windows? And what's more, on Windows < 7?
(And they also need to be able to recompile with the very latest Go?)
I've seen guys commit code requiring a new Go version the day it was released! My own preference is to wait a few months, but I'm naturally conservative.
I will be that guy once Go 1.11 releases. The reason being, Golang finally added feature [1] we were asking for since Jan 2015, it allows us to replace about 3k LOC of platform specific, low level (syscall) and error-prone code with 10 lines.
bradfitz of the Go team did mention in an earlier thread [1] that this mainly means that they won't be testing on those older OSes.
[1] https://dev.karakun.com/java/2018/06/25/java-releases.html
Could you elaborate on this? Are you perhaps talking about STM? I can't think of anything else that is really missing.
https://dave.cheney.net/2017/07/22/should-go-2-0-support-gen...
For us to consider generics, show us an implementation, that:
1. Doesn't hurt compile times too much. 2. Doesn't bloat the binary too much. 3. Doesn't hurt run-time performance too much. 4. Doesn't fundamentally change the language syntax too much. 5. Doesn't complicate the type system too much. 6. (My personal fav) - Plays nicely with Go interfaces. (Seriously, good luck with that one!)
Show us that and no problem - you'll get generics!
Now before you go off and waste months doing that, realize that it's them basically politely telling the community to piss off with these generics proposals. But they're free to write comments in a dozen or so Github issues if it makes them feel better, why not.
If you've been following the language since 2010 or so, like I have, you'd know by now that roughly 4 well-thought generics proposals have been shot down by the core team.
Programmers are really horrible with emotional intelligence and reading between the lines, it seems.
Yeah, that's there specifically to be pointed to for all the people that say "generics would be easy to add to the language, just do it"
Visible work done on generics, beyond go generate, zero.
Unless you also want to teach me how to check Go's source code for the pull request related to that issue.
Until then it is all just smoke and mirrors.