Earlier quoted context omitted.
How is it dangerous? Your qualifying remarks with regards to Haskell's domain make no sense. If you need a fast, compiled language with managed memory, high ease of development and a strong ecosystem then you can't go wrong with Haskell. 'Type stable computation' and a strong correctness guarantee are some added benefits of Haskell, though any strongly typed language (like for example Rust) will have these qualities.…
Haskell's runtime has one overriding attribute: laziness. If laziness is not desirable in your domain, Haskell is not a useful option
What Golang Is and Is Not
131–140 of 279 posts
Re: What Golang Is and Is Not
#132Earlier quoted context omitted.
Go doesn't make real world programming easier. It makes you work hard for pointless things. Most of its problems are from a lack of generics.
Yep. Add those and a proper type system and you have yourself a decent language. But when the creator of the language doesn't see the value in abstractions [0], then it's probably never going to happen. [0] https://github.com/robpike/filter
Most languages which provide a reduce() permit programmers to provide an initial "carry-in" value. This is a neater and more useful way to handle the cases of a zero- or one-element list. Moreover, it lets you do more interesting things with the reduction. Consider the following, using ES6-style JavaScript to collect a set of the unique values of a list via reduce():
function unique(list) {
return list.reduce(function (sofar, item) {
if (!sofar.includes(item)) { sofar.push(item); }
return sofar;
}, []);
}Re: What Golang Is and Is Not
#133> “There is nothing new under the sun” rings true in all languages since the 80’s. Really? Nothing? Sure a language like Rust has drawn from many other concepts in other languages, but it has done so while actually bringing high level features to a language that has zero overhead costs. But yes, it's not simple like Go. Did Go need to make all errors unchecked? There are no guide rails telling you that you forgot to…
>innovative feature of Go is the small runtime built into the binary making deployment dead simple and easy. Is rust the only good alternative here to golang if you one doesn't want to write c/c++ ?
Re: What Golang Is and Is Not
#134Earlier quoted context omitted.
Go has been around nearly a decade with the backing of none less than Google and yet it remains a fairly fringe language. Elixir is on a much steeper adoption curve. So is Swift, but Elixir doesn't even have a tech heavyweight behind it.
Go 1.0 is released in March 2012 so it is not even half decade old.
Edit: karma_vaccum123 has greatly edited the gp comment but for the record, Google has been using golang since 2007.
Re: What Golang Is and Is Not
#135Re: What Golang Is and Is Not
#136I'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!)
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 from either of those. In fact shipping multiple binaries for different architectures is a bit of a detractor for Android considering it supports MIPS, ARM, and x86.
> until I realized Al-*-Go was not actually written in Go!
Again, AlphaGo was based off technology from DeepMind, a company Google acquired.
Please atleast do some quick wikipedia browsing before spewing FUD.
Re: What Golang Is and Is Not
#137Earlier quoted context omitted.
Go doesn't make real world programming easier. It makes you work hard for pointless things. Most of its problems are from a lack of generics.
It may be harder to write some things, but it definitely is easier to read Go code. Besides, while the language itself may be more verbose than it could be, the standard library is extremely pragmatic and terse. It's like the opposite of the standard C++ library. E.g. to see if a string starts with another string in C++: std::mismatch(prefix.begin(), prefix.end(), toCheck.begin()).first == prefix.end() In Go: strings…
In reality, these two methods do completely different things. `std::mismatch` is a completely generic algorithm that 'returns the first mismatching pair of elements from two ranges', which can be used for much more than `strings.HasPrefix`.
Re: What Golang Is and Is Not
#138Earlier quoted context omitted.
> Not explicit programmer control, but I think you can reasonably make it do what you want. Escape analysis, like any such analysis, gets much more difficult in the presence of higher-order control flow. Currently the Go compilers punt on higher order control flow analysis. And Go uses higher-order control flow in spades, due to its heavy reliance on interfaces. The end result is that lots of stuff is heap allocated.…
> That's not true for Java. Its generational garbage collector performs bump allocation in the nursery, yielding tightly packed objects with excellent cache behavior. Allocation in HotSpot is like 3-5 instructions (really!) When I see this link I get different impression. http://mechanical-sympathy.blogspot.com/2012/10/compact-off-... It is only heavy use of sun.misc.Unsafe and unidiomatic coding style that give Java…
Re: What Golang Is and Is Not
#139Earlier quoted context omitted.
Go doesn't make real world programming easier. It makes you work hard for pointless things. Most of its problems are from a lack of generics.
It may be harder to write some things, but it definitely is easier to read Go code. Besides, while the language itself may be more verbose than it could be, the standard library is extremely pragmatic and terse. It's like the opposite of the standard C++ library. E.g. to see if a string starts with another string in C++: std::mismatch(prefix.begin(), prefix.end(), toCheck.begin()).first == prefix.end() In Go: strings…
Sorting a slice is a pretty obvious counterexample.
Re: What Golang Is and Is Not
#140Earlier quoted context omitted.
Elixir is nicer to look at, Go is easier to understand.
I find "nice to look at" and "easier to understand" tend to converge over time. Elixir pushes me to expand my mental maps a bit more than Go, but once I grok it the code reads much more coherently and concisely. Go to me reads like an ELI5 programming language.
Sounds like something that won't hold up as well over time.