Earlier quoted context omitted.
Installable binaries, around 2000, when the first commercial JDKs started having AOT compilation to native code. Currently available on PTC, Aicas, IBM, OpenJDK AppCDS (originally from BEA J/Rockit), GradleVM native images, Android ART AOT compilation. Dynamic heap size, since ever. Every JDK vendor had their own specific switches to configure it. Versioned modules, since Java 9 alongside Maven/Gradle. Value types, y…
Except that in the real world no one use installable binaries and everyone is embedding 150MB of JRE / JDK.
Go 1.13 Release Notes
251–260 of 264 posts
Re: Go 1.13 Release Notes
#252Earlier quoted context omitted.
Personal opinion: no. Go's concurrency is hard to control or monitor, and it's hard to make higher level abstractions that are both safe and convenient. It's of course possible, but the tradeoffs are rather severe. Go's concurrency shines best in short-lived single-purpose processes, which is a near perfect fit for CLI tools. When you don't care if something gets abandoned or fails to make progress and can just ctrl-…
> Go's concurrency shines best in short-lived single-purpose processes, which is a near perfect fit for CLI tools This is not reasonable. Go's concurrency shines for its flexibility. It has nothing related to whether or not the written programs are short/long-lived. It is the only language which gives me a happy and fun experience in concurrent programming. > For long lived processes though, like most services, it fe…
Which is true to some degree, you can build anything in anything if you're careful enough. But programming history is full of repeated, preventable errors, and languages where X error is impossible or much less likely if you're less than perfect.
Go's rather far down "unsafe" in my books, especially in regards to concurrency and error handling. For simple code, it's pleasantly simple. For larger, robust code, it's several times more verbose than other langs I've used, and often requires continually re-implementing common "wheels" (that should not usually be written by hand, as they're finnicky to get right, which is also easy to miss in code review) to get around a lack of generics.
Re: Go 1.13 Release Notes
#253Earlier quoted context omitted.
> Go's concurrency shines best in short-lived single-purpose processes, which is a near perfect fit for CLI tools This is not reasonable. Go's concurrency shines for its flexibility. It has nothing related to whether or not the written programs are short/long-lived. It is the only language which gives me a happy and fun experience in concurrent programming. > For long lived processes though, like most services, it fe…
That's kinda like saying "language ergonomics and api design don't matter, you just need to be careful". Which is true to some degree, you can build anything in anything if you're careful enough. But programming history is full of repeated, preventable errors, and languages where X error is impossible or much less likely if you're less than perfect. Go's rather far down "unsafe" in my books, especially in regards to…
Rust does prevent some errors at compile time, but achieving this has its own cost, such as sacrificing flexibility and simplicity. For many use cases, the sacrifices are not worth it.
> it's several times more verbose than other langs I've used, and often requires continually re-implementing common "wheels"
If the common wheels need generics to implement, I have nothing to defend. I can only say generics will come to Go eventually.
Re: Go 1.13 Release Notes
#254Earlier quoted context omitted.
I’ve worked on two projects (in early x86 assembler) that ran out of steam because they took too long to do and it was hard to onboard new developers. I’ve also abandoned a few paths during projects because of libraries that were overly abstract, didn’t work and were thus hard to understand and maintain. A product at a company I used to work for had to reimplement a huge chunk of code because the original designer le…
Like this? https://archive.fosdem.org/2019/schedule/event/kubernetesclu...
I’m not quite sure this is what I meant from the description of the problem. This looks more like a problem of trying to program Java in Go. What I was thinking of was more along the lines of modeling things in ways that either disconnect you from the problem you are trying to solve or solve it with too much abstract cruft grafted onto the model so just dealing with the abstractions themselves becomes more work than a more direct and naive approach.
Re: Go 1.13 Release Notes
#255Earlier quoted context omitted.
I just wish there were more jobs for either. They're both much less popular than I expected.
It depends on which fields of your expected jobs are. Go is the language of cloud infrastructure, and half of blockchian projects are written in Go.
On my bubble everything cloud is either Java or .NET, alongside VM images, and native OS containers.
Azure and AWS also have hardly any major tech done in Go.
Re: Go 1.13 Release Notes
#256Earlier quoted context omitted.
it's not. Go has block-level scoping. = means "assign the existing identifier to this value". := means "create a new identifier". https://play.golang.org/p/Irqxm0okfkt
Thanks for the example. In all my life I never actually wanted to do something like this, but well... It's neat that go allows this.
if err := fn(); err != nil {
}
// the result of fn does not affect the identifier err
// in the enclosing scope
you're scoping err just to that if block. that's ... just about the most common phrase in all of Go. it won't affect any err defined prior and it won't exist outside of the if block.You'd have to do this to make the value stick around or affect the enclosing block:
var err error
if err = fn(); err != nil {
}
// err has the result of fn hereRe: Go 1.13 Release Notes
#257Earlier quoted context omitted.
Compatible with what exactly. No one uses octal. Here is a link to Pike fucking it up 10 years ago. https://github.com/golang/go/issues/151#issuecomment-6604830...
Lots of code uses octal. Its still the standard way of notating file permission bits on unix: os.Chmod(filename, 0777). You would break so much code if you just threw that away.
... and honestly, is the ONLY place where I have ever seen octal been used.
Re: Go 1.13 Release Notes
#258Earlier quoted context omitted.
Strings are fixed-size, though. A string is a pointer and a length. It's true that you can't use a slice as a map key, though, even though slices are also fixed-size (pointer, length, and capacity). As I recall, the argument is that the equality rules for slices are unclear. (maps and funcs can't be used as keys either, for the same reason: they're not comparable.) Is a 0-length slice equal to a nil slice? Is a slice…
Would it be too hard to just compare arbitrary slices and arrays based on the contents of said data structures? Converting arbitrary bytes to strings should fail at least some times, since not all byte sequences are valid UTF-8, and afaiu, in Go, the string type should always contain valid UTF-8.
Re: Go 1.13 Release Notes
#259I occasionally use Python for large-scale processing of structured data (XML, JSON) and the data's really messy as you'd expect (malformed responses, missing fields, normalisation, etc..). One of the things putting me off of Go for these kinds of projects is it's much more verbose/harder to handle edge cases - it feels like I'm less productive writing the program, but end up building something much more stable than t…
> is it's much more verbose/harder to handle edge cases - it feels like I'm less productive writing the program, but end up building something much more stable than the Python equivalent This is exactly how I felt moving from a Python codebase to Go. But you realize on the 100th or so Python stacktrace that it's worth the investment up front, if not for type safety alone. > I really need the performance for my worklo…
Not sure I fully understand the NFA vs DFA/re2 choices -- seem like the issue above conflicts with the comment below. Can someone clarify?
From [1]: "Go has chosen to follow the re2 path (not surprising, since Russ Cox is a major author of both Go and re2). re2 has much better performance characteristics than some other regexp engines, in that it never has an exponential slowdown, but that comes at a cost for other regexps (https://swtch.com/~rsc/regexp/)."
[1] https://www.reddit.com/r/golang/comments/84o986/why_is_gos_r...
Re: Go 1.13 Release Notes
#260Earlier quoted context omitted.
> is it's much more verbose/harder to handle edge cases - it feels like I'm less productive writing the program, but end up building something much more stable than the Python equivalent This is exactly how I felt moving from a Python codebase to Go. But you realize on the 100th or so Python stacktrace that it's worth the investment up front, if not for type safety alone. > I really need the performance for my worklo…
> on the 100th or so Python stacktrace Go's not perfect in this respect, either. I had your typical map[string][]interface{}, because the data in the map was an array of records, but different records in different cases, and made an error in an append(), so ended up with nested arrays. That's correct according to the type definitions, but unwanted. Generic could have helped here. So I think the language still needs t…