Earlier quoted context omitted.
Dang, just like PHP (no built in set)
And yet there is a generic in array function.
What Golang Is and Is Not
231–240 of 279 posts
Re: What Golang Is and Is Not
#232Earlier quoted context omitted.
OTOH maybe we will be surprised by the name of first language with working compiler to web assembly.
Ohhh that would be amazing, have you got inside information that you can share?
Re: What Golang Is and Is Not
#233Earlier quoted context omitted.
> Go is a language that pushes remembering corner cases and failure conditions onto the programmer Can you elaborate on this? I write go for 3+ years and I have no idea what corner cases and failure conditions do you mean.
A corner case about Go which makes me absolutely crazy: calling Reset() on a timer which has already fired has the biggest gap between "What I expect to happen" and "What actually happens" of any stdlib I've ever worked with. https://gist.github.com/patio11/bc883d566778c323742432c203e6... (You can see it here in the playground, but try it on your local machine if you don't believe me and/or think the playground has a…
See https://github.com/golang/go/issues/11513 and https://groups.google.com/forum/#!topic/golang-dev/c9UUfASVP... for some background.
Re: What Golang Is and Is Not
#234I'm not a Golang programmer, but the mere fact that GOOG decided Java for android is convincing enough that even GOOG does not believe in its Go. (Frankly, I doubted that a little, until I realized Al-*-Go was not actually written in Go!)
Android predates Go. And it wasn't even started by Google.. Android was it's own company and had already made it's decision on Java well before Google decided to buy it. Not to mention Go is focused on a different use case. Go is gunning for microservices (with it's concurrency chops) and CLI based tools (being a single compiled binary).. whereas Android apps are a totally different beast that stands little to gain f…
So? Apple introduced Swift after Obj-C to make developing iOS apps easier. What about GOOG? Couldn't they at least use Dart or Go (both of which they developed) for android app development after Java? BTW, last time I checked, they're still in for a lot to come from Oracle.
> Again, Al-*-Go was based off technology from ...
So let me get this straight. They bought a technology which was apparently written in C++/JS and rewrote it in another lang, but then again, they did not choose Go or Dart.
Seems like some one needs a wikipedia browsing...
Re: What Golang Is and Is Not
#235Earlier quoted context omitted.
And yet there is a generic in array function.
...which is O(n). Unless the set is trivially small, better to coerce your data to key types and use array_key_exists().
Re: What Golang Is and Is Not
#236Earlier quoted context omitted.
> Go is a language that pushes remembering corner cases and failure conditions onto the programmer Can you elaborate on this? I write go for 3+ years and I have no idea what corner cases and failure conditions do you mean.
Examples that bother me sometimes. YMMV of course. Writing to a closed channel panics, but writing to a nil channel blocks forever. Appending to a nil slice works fine, but inserting into a nil map panics. If you have a function that returns an error struct, and you wrap it with another function that returns the error interface, nil returns from the inner function will no longer test equal to nil. Defining a method w…
Re: What Golang Is and Is Not
#237Earlier quoted context omitted.
As someone who writes Go every day for work, I can't agree that Go is simple. You may be confusing "simple" with "good". A simple solution to a complex problem may not be a good one. Go can be simple and still not a great solution because it pushes complexity to a higher level.
Go handles simple problems well but copy pasting more "simplicity" as complexity scales results in a complex program.
Re: What Golang Is and Is Not
#238Earlier quoted context omitted.
Go (the language) have at least two implementations: the official Go implementation and GCC (yes, Go is included in GCC, along with Fortran and Ada). The latest Go implementation (Go 1.7) has made Go a lot faster. I would argue that it closer the speed of executables generated with GCC (gcc/g++) than OpenJDK, the Oracle JVM, Mono or the .NET compiler for C#. Go (the language) can be made just as fast as C (the langua…
> The latest Go implementation (Go 1.7) has made Go a lot faster. I would argue that it closer the speed of executables generated with GCC (gcc/g++) Go 1.7 performs nowhere near the set of optimizations that GCC and LLVM do. GCC/LLVM have a huge number of algebraic simplifications (InstCombine), aggressive alias analysis, memory dependence analysis, instruction scheduling, an optimized instruction selector, a highly…
Re: What Golang Is and Is Not
#239Earlier quoted context omitted.
> Nim is a very good language… Is it as good at concurrent services as golang is?
There are many use cases for which Nim might very well be a very good language other than concurrency.
Re: What Golang Is and Is Not
#240Accusing other languages of suffering from paralysis of choice and fragmentation and offering "go get" as an example of solving this is truly ironic: https://github.com/avelino/awesome-go#package-management
Why? `go get` is an obvious default choice for package management. You don't have to make a choice. There would be paralysis of choice if when you install Go you were forced to choose from that list, but you aren't.
I thought go get wasn't a package manager /s