News for hackers. Stuff that matters.
Re:I Love Go; I Hate Go by dpc_pw on Tuesday August 02, 2016 @03:01AM (#12208253)
Oh. Go love-hate relationship post. My turn. So I really like channels and coroutines built into language and used everywhere: it makes some patterns compose nicely and language very productive.

But just as in the article - some of Golang choices are opinionated and IMO just stupid. Lack of assertions is one: Sure programmers are prone to ignoring errors, but Go is not helping at all. Just bans assertions and provides no improvements. No `try!`&`Result` like Rust, not even warning by default if you ignored returned error (IIRC, go lint or go vet checks it) . So what's the point?

How do you decrement an atomic in Go?

AddUint32(&x, ^uint32(c-1))

That's how. Easy to read, and self-explaining. https://golang.org/pkg/sync/atomic/ . I mean... come on.

Unused errors being an error is super annoying, and changing variable capitalization everywhere, because you want to change symbol visibility is another daily frustration source.

Oh, and all my contacts with the community were very unpleasant (maybe it's just me, or bad luck). Any questions ended with some form of "you must do it one true way, otherwise you're stupid". Eg. once I was looking for a way to terminate unit test in case of error, instead of writing `if err != nil { t.Errorf(...) }` over and over again after every line, as in test, every error is just terminating condition. In Rust I would just `.unwrap()` or `.expect()`, which would fail the test, report backtrace, etc if anything unexpected went wrong. All the help that I got was just snarky comments for being lazy.

I will continue to use Go in some projects, as it gets the job done, performance is OK, has some userbase, and ecosystem is quite vital, but overall, it seems to me that it's rooted in same form of stubborn crudeness that has no good reason in XXI century, ignoring years of research and good ideas. For anything more demanding, or fun I would always go with Rust.

Re:I Love Go; I Hate Go by superswordfish on Tuesday August 02, 2016 @04:54AM (#12208584)
> ignoring years of research and good ideas

And people are falling over themselves to use Go in places that seem inappropriate. Most of Go's strengths shine in a large team of mediocre developers: Low build times, low abstraction, quick ramp-up, etc. So why do startups choose Go? You're just shooting yourself in the foot. Use OCaml, use C++, use Clojure, hell, use Swift or Rust, just use something that at least pretends to care about expressiveness and abstraction. I actively avoid working for shops that use Go heavily, it's an indicator of cargo-culting.

Re:I Love Go; I Hate Go by TurboHaskal on Tuesday August 02, 2016 @07:25AM (#12209105)
I run a few side projects with a pool of about a dozen developers. Some love Java but others won't touch it, some are C developers, one of them only has experience with PHP, there are lispers, an Erlang zealot and even a Delphi refugee. I personally like Perl and OCaml but couldn't convince them to even consider them. It was a nightmare to agree and settle up with something.

Enter Go, and while we all agreed that the language kind of sucks and $FAV_LANG is better, we somehow stopped bike-shedding and started to get real work done.

Sure, it's not the most exciting language in the block and its community seems to live in the 70s, but sometimes targeting the lowest common denominator can pay off, as is the case for us.

Re:I Love Go; I Hate Go by pjmlp on Tuesday August 02, 2016 @09:08AM (#12209627)
> Sure, it's not the most exciting language in the block and its community seems to live in the 70s, but sometimes targeting the lowest common denominator can pay off, as is the case for us.

Except that even Algol 68 is more feature rich than Go, assuming a 60's powerful computer, like the Burroughs B5000. :)

But I do appreciate that every line of written Go code is one less of written C code.

Re:I Love Go; I Hate Go by AnimalMuppet on Tuesday August 02, 2016 @12:59PM (#12211328)
Define "feature".

Go thinks fast compile time is a feature. How fast is your Algol 68 compiler on a ten million line code base?

Re:I Love Go; I Hate Go by devishard on Tuesday August 02, 2016 @02:24PM (#12212004)
1. How many people have 10 million line code bases?

2. How many of those people would have much smaller codebases if they used a more expressive language?

3. Of the people who have 10 million line codebases and would still have 10 million line codebases in a more expressive language, how many of those could actually compile their programs faster if they used a language that allowed partial compilation of only the parts of the code that were changed?

Very few people have Google's problems, and I'm not even completely convinced that Go is the best way to solve Google's problems.

Re:I Love Go; I Hate Go by pjmlp on Tuesday August 02, 2016 @01:33PM (#12211571)
Fast enough for a 60's computer, imagine nowadays.

But if you want numbers, Turbo Pascal 5.5 was doing 34,000 lines/minute[1] on MS-DOS back in 1989.

[1] http://edn.embarcadero.com/article/20803

Re:I Love Go; I Hate Go by AnimalMuppet on Tuesday August 02, 2016 @04:02PM (#12212893)
Turbo Pascal isn't Algol 68. A PC in 1989 isn't a B5000. But even accepting the example, 34,000 lines/minute gets you a compile that takes 294 minutes, or just under 5 hours. That's... not very good.

Of course faster hardware is part of the answer, but I suspect that it doesn't cover nearly all the ground between Turbo Pascal's compile time and Go's.

Re:I Love Go; I Hate Go by pjmlp on Tuesday August 02, 2016 @04:31PM (#12213147)
I gave Turbo Pascal as an example, because even when compared against it, there are many features that Go lacks and Turbo Pascal had.

Besides I am comparing an 8086 with 640 KB against a i7 with 16 GB and three level caches.

Go being fast isn't that much of an achievement in 2016.

If Go compiles faster than Turbo Pascal with an 8086 CPU and 640 KB RAM, that is an achievement.

Re:I Love Go; I Hate Go by AnimalMuppet on Tuesday August 02, 2016 @04:43PM (#12213241)
I am going to guess that Go compiles at least 10 times faster than Turbo Pascal. From the numbers you gave, I think at least a factor of ten is left even after you account for the difference in hardware speeds.
Re:I Love Go; I Hate Go by pjmlp on Wednesday August 03, 2016 @01:37AM (#12215833)
So you are stating that Go will compile 10x faster than Turbo Pascal on a 8086 with 640 KB?!

My point is that Go's compilation speed isn't nothing extraordinary, I can keep giving examples of other compiled languages that had equally fast compilers in the the mid-90's.

Oberon, Go's grand daddy could bootstrap itself and build a full working graphical workstation OS in less than one minute if I remember correctly.

Re:I Love Go; I Hate Go by txdv on Tuesday August 02, 2016 @10:22AM (#12210124)
Sounds like a prison for programmers.
Re:I Love Go; I Hate Go by jsmith0295 on Tuesday August 02, 2016 @07:23AM (#12209096)
I think it really depends on what kind of software you're writing. At my startup (around 30 engineers) most of what we do is web based, and our backends are mostly written with Java and Spring Boot now. Go is simpler, more productive, has better concurrency, and still has good static analysis. The benefits mostly seem to come from the removal of bullshit rather than the addition of nice abstractions.
Re:I Love Go; I Hate Go by themihai on Tuesday August 02, 2016 @07:31AM (#12209128)
You don't know what you are talking about. Have you seen any Swift backend used in production? Would you use C++ for a web API? Go was developed because C++ is a horibble language and I'm glad it didn't adopt the expressiveness and abstraction from C++.
Re:I Love Go; I Hate Go by coldtea on Tuesday August 02, 2016 @09:25AM (#12209731)
>You don't know what you are talking about. Have you seen any Swift backend used in production?

He said "hell, use Swift" -- which didn't imply that he's considering it the first or best recourse.

That said:

1) There's far more Swift in production (on iOS devices as native apps, not as backend, but still production code) than Go.

2) Merely 4-5 years ago nobody had seen Go in backend (web/server) production either. Or at least very few.

3) There's already some support for server side Swift: http://perfect.org/

4) And more: IBM uses Swift for apps AND server side, and has open sourced a Swift web framework/server: https://github.com/ibm-swift/kitura

>Would you use C++ for a web API?

If I needed the crude speed yes, and in fact lots of web APIs delegate to C++ behind the scenes (e.g. for task queues), whereas some are in C++ directly.

In fact Facebook itself used to transpile PHP to C++ and run that (through their HipHop project).

>Go was developed because C++ is a horrible language

Go was developed because some old C/UNIX hackers didn't much like C++/Java and wanted to do their own thing, bringing some Plan 9 flavor on.

C++, warts and all, has proven itself time and again.

Most of the things we depend on and use, from the browser you're using, to JITS and compilers (LLVM for one, V8), to the Windows OS, nearly all major GUI programs (all major DAWs, NLEs, Photoshop, 3D programs, KDEetc), to 99% of AAA games, to Google's search engine core are written in C++.

And C++11/C++14 standards have made it a much better, even new, language. The automatic C++ dislike is cargo cult from people who usually don't use it and just repeat old wives tales.

Re:I Love Go; I Hate Go by themihai on Tuesday August 02, 2016 @11:12AM (#12210516)
>He said "hell, use Swift" -- which didn't imply that he's considering it the first or best recourse.

I've got that but it was too late... the comment was already posted. I've up-voted his response.

The rest of your points are invalid. Development is not only about a http server(which I'm sure is subpar compared with Go). You will burry your time and energy in making basic things work. As developer that's great because you can use your experience on your "next" project but as a start-up you are very likely to fail. There may be some IBM developers that played around with the language but I'm sure IBM has no swift powered service in production. Swift is still a language in flux with many changes pending in the next 2 -3 versions. Big corporations don't really like to invest in unstable environments. Maybe in 3-4 years from now Swift will be able to compete with Go but today there is really no reason to use Swift over Go for a backend service.

> Go was developed because some old C/UNIX hackers didn't much like C++/Java and wanted to do their own thing

I must say it again: C++ is a horrible language. It may perform well and it may be widely spread but that doesn't change much as far as its design is concerned. C++ competes mostly on its reach not on its merits. Hopefully that will change as new platforms emerge(i.e Rust).

> In fact Facebook itself used to transpile PHP to C++ and run that (through their HipHop project).

Yeah, that's a pretty picture for what C++ is really good for. I rest my case.

Edit: I would also say "experienced hackers" instead of "old hackers". The C++ or Swift hackers are not younger anyway.

Re:I Love Go; I Hate Go by unscaled on Tuesday August 02, 2016 @11:58AM (#12210851)
C++ is horrible in many ways, but Go never really tried hard to replace it (although it claimed to do that in the beginning, before it was refocused as a language for backend and tools).

The are many reasons for that, but most importantly, Go doesn't support deterministic memory management (like C++, Rust and Swift) and opts for GC instead, which makes life easier for at least 95% of its use cases, but not for some of the use cases C++ used to shine on.

I think that the Plan 9 Googlers dislike of C++ (and in truth, Modern C and UNIX as well) is closer to be the real reason for creating Go. It really was never designed to be a proper system language.

Re:I Love Go; I Hate Go by coldtea on Wednesday August 03, 2016 @06:16AM (#12216915)
>The rest of your points are invalid. Development is not only about a http server(which I'm sure is subpar compared with Go). You will burry your time and energy in making basic things work.

The same could be said, and was said for Go compared to Java C#, etc just a few years ago. And it probably can still be said, as older languages have much more stable, richer ecosystems, support, tooling, and use bases.

>I must say it again: C++ is a horrible language. It may perform well and it may be widely spread but that doesn't change much as far as its design is concerned. C++ competes mostly on its reach not on its merits. Hopefully that will change as new platforms emerge(i.e Rust).

Well, it gets a lot of things right. Compatibility with C. Great performance. Enough abstractions to be usable. Enough batteries built-in compared to C. Great ecosystem and tooling, first class vendor support, etc. A language is not just its syntax -- not even just its semantics.

Re:I Love Go; I Hate Go by themihai on Thursday August 04, 2016 @05:32PM (#12228627)
>>The same could be said, and was said for Go compared to Java C#, etc just a few years ago. And it probably can still be said, as older languages have much more stable, richer ecosystems, support, tooling, and use bases.

I don't say that you should never use C++. Sometimes it's a necessary evil but that doesn't make it a great/pleasant choice(at least for me).

>> Great ecosystem and tooling

I think it could be considered GREAT 20 years ago but now it is miserable compared with the new languages. For example it has no kind of distribution model(i.e package manager). Cross platform compiling is no fun... C++ parsing is no fun either so you could say that its syntax is quite important if you were to develop new tools.

Re:I Love Go; I Hate Go by superswordfish on Tuesday August 02, 2016 @07:36AM (#12209148)
It really depends on the project. I'd prefer Clojure or Erlang for most frontends, a Lisp for the backend of an expert system, and C++ or OCaml for any heavy lifting. Python still can be a great choice for all sorts of systems too. Swift and Rust aren't quite there yet but for a startup might be worth a look in time. We're not talking about "nobody ever got fired for choosing IBM" business here and being risk-averse is itself risky.
Re:I Love Go; I Hate Go by themihai on Tuesday August 02, 2016 @07:50AM (#12209213)
I find swift the worst choice for a start-up right now. Why would you use a language that's only half baked? Don't you have more important things to do than porting the standard library to linux? Not to mention the lack of concurrency. Go can be a grat choice for all sort of systems too and in many cases better than any of the languages you listed. It's about using the right tool for the job and I think your comments about Go are plain ignorant.
Re:I Love Go; I Hate Go by superswordfish on Tuesday August 02, 2016 @08:05AM (#12209280)
You're going after my hyperbolic recommendation (it follows "hell,") and calling me ignorant when we merely disagree. This is a waste of time.
Re:I Love Go; I Hate Go by pjmlp on Tuesday August 02, 2016 @09:10AM (#12209641)
> Have you seen any Swift backend used in production?

Lots of iOS applications use it already.

> Would you use C++ for a web API?

Facebook and Google apparently do use it.

Re:I Love Go; I Hate Go by zaphar on Tuesday August 02, 2016 @09:23AM (#12209717)
And Google is actively replacing a lot of those with Go because using C++ for a web api is painful.
Re:I Love Go; I Hate Go by coldtea on Tuesday August 02, 2016 @09:26AM (#12209741)
That's a myth. Google is not actively replacing anything with Go. Some new stuff is written in Go, and a few small parts here and there were rewritten in Go during a major refactor.

There's no active program to rewrite things in Go, and most things are not meant to be written in Go from now on or anything -- it's just one of the supported languages.

Re:I Love Go; I Hate Go by zaphar on Tuesday August 02, 2016 @10:39AM (#12210262)
Fair enough. I used poor wording there.
Re:I Love Go; I Hate Go by pjmlp on Tuesday August 02, 2016 @10:16AM (#12210077)
The only ones that Google has officially replaced has been on YouTube and downloads server.
Re:I Love Go; I Hate Go by biztos on Tuesday August 02, 2016 @07:08AM (#12209034)
> Most of Go's strengths shine in a large team of mediocre developers: Low build times, low abstraction, quick ramp-up, etc.

I find some of those strengths and others shine in a small team of strong developers too, if they "get" Go.

But to your point: some people expect their startups to eventually employ a large number of programmers, at which point they will inevitably have some mediocre ones, that being a side effect of "hiring only the best."

Planning for that day is not shooting yourself in the foot.

Re:I Love Go; I Hate Go by nutheracc on Tuesday August 02, 2016 @05:38AM (#12208748)
You've hit the nail on the head for me at my current place of work. The only alternative I have here is Scala, which I wouldn't choose, but higher quality ecosystem and community, and closer to Rust which I'm enjoying at home, so am thinking of doing the switch.
Re:I Love Go; I Hate Go by runT1ME on Tuesday August 02, 2016 @08:02AM (#12209269)
I cannot imagine a scenario where Go would be a better fit for a team of skilled engineers (compared to scala). Maybe ramp up time would be the only thing, but even still the dividends you can reap from scala's more complex abstraction are worth the initial investment as they are applicable to multiple projects (as opposed to learning a complex framework or whatnot).
Re:I Love Go; I Hate Go by millstone on Tuesday August 02, 2016 @03:11AM (#12208284)
> How do you decrement an atomic in Go?

Ooh. How do you delete from a slice in Go? With append() of course!

http://stackoverflow.com/questions/25025409/delete-element-i...

Re:I Love Go; I Hate Go by nneonneo on Tuesday August 02, 2016 @03:57AM (#12208418)
That solution (append(a[:0], a[1:]...)) doesn't look remotely performant. I don't have a copy of go handy to test, but exploding most of the list into individual arguments and passing them to a variadic function, just to pack them all back into an array, seems quite circuitous to me.

Is that really the _best_ way to delete from a slice in Go?

Re:I Love Go; I Hate Go by masklinn on Tuesday August 02, 2016 @04:51AM (#12208574)
> Is that really the _best_ way to delete from a slice in Go?

Yep[0], and it needs a special case to remove the last element of the slice (if the index is user-provided). If you don't care about the slice order you can also swap the element you want to delete with the last element of the slice and shrink the slice by one element. Also fun, it can leak memory.

[0] https://github.com/golang/go/wiki/SliceTricks

Re:I Love Go; I Hate Go by bbatha on Tuesday August 02, 2016 @10:52AM (#12210361)
That article is a concession speech on why generics are useful. Every single "trick" in the article is titled with the name of the equivalent method in more powerful languages. I don't think its possible to look at that list of tricks or the amount of boiler plate to get simple methods like `sort` or `keys` and assert the language is "simple" and better off for it.
Re:I Love Go; I Hate Go by masklinn on Tuesday August 02, 2016 @12:48PM (#12211242)
Not even that, Go does have generics for its special magical builtin types (map, slice, channels, … are generic) or functions (close, delete or the aforementioned append are generic)
Re:I Love Go; I Hate Go by danieldk on Tuesday August 02, 2016 @05:03AM (#12208622)
It doesn't explode the slice:

If the final argument is assignable to a slice type []T, it may be passed unchanged as the value for a ...T parameter if the argument is followed by .... In this case no new slice is created.

https://golang.org/ref/spec#Passing_arguments_to_..._paramet...

(Otherwise, I completely agree that having to use append to remove an element is stupid.)

Re:I Love Go; I Hate Go by matthewmacleod on Tuesday August 02, 2016 @06:34AM (#12208919)
Unfortunately yes. It's a great example of the sort of thing that Go does pretty badly in my experience – even though it's idiomatic, and technically performant behind the scenes, it looks immediately confusing and slow.
Re:I Love Go; I Hate Go by thwd on Tuesday August 02, 2016 @07:10AM (#12209043)
A slice is a view over a continguous array. deleting an index in a continguous array is inherently O(n). Go doesn't obscure this. The pain of writing it out reflects the complexity of the operation.
Re:I Love Go; I Hate Go by coldtea on Tuesday August 02, 2016 @09:29AM (#12209755)
>The pain of writing it out reflects the complexity of the operation.

And why would one even remotely want that?

Unless they seriously think that if the syntax is painful, people will avoid doing it and get better performance...

Re:I Love Go; I Hate Go by zimbatm on Tuesday August 02, 2016 @07:31AM (#12209129)
It's because it's the wrong data-structure for the job. A slice is not sparse.

If you need to delete from the middle of an ordered collection of items then it's better to use a linked or doubly-linked list (unless it's small then it doesn't matter).

Re:I Love Go; I Hate Go by masklinn on Tuesday August 02, 2016 @08:11AM (#12209310)
> It's because it's the wrong data-structure for the job. A slice is not sparse.

So?

> If you need to delete from the middle of an ordered collection of items then it's better to use a linked or doubly-linked list (unless it's small then it doesn't matter).

Meh. Deleting from the middle of an array is one memmove, you don't get 1~2 pointers memory overhead, caches blown and having to deref' n pointers getting to the item to remove in the first place. If your language provides arrays, there are almost no cases where you should reach for linked lists without having seriously benched both cases.

And that's before the consideration that a Go linked list means loss of type safety or a hand-rolled hand-specialized implementation.

Re:I Love Go; I Hate Go by junke on Tuesday August 02, 2016 @08:31AM (#12209414)
You don't want to memmove an array which content is shared by another array, which is what slices are about.
Re:I Love Go; I Hate Go by _ph_ on Tuesday August 02, 2016 @05:27AM (#12208720)
If the order of the elements in a slice does not matter, this should be the easiest solution for deleting the element "n":

slice[n] = slice[len(slice)-1]

slice = slice[:len(slice)-1]

Probably one should campaign for adding a delete operator to slices, though so far I have never missed it.

Re:I Love Go; I Hate Go by matthewmacleod on Tuesday August 02, 2016 @06:35AM (#12208927)
This is a great example of the sort of thing that frustrates me when I'm using Go. Deleting an element from a slice is an obvious, common, simple operation. In order to do this, I have to build that operation from primitives, despite the fact that it will be more error-prone to do so. There are lots of other annoyances like this, too.
Re:I Love Go; I Hate Go by thewhitetulip on Tuesday August 02, 2016 @03:25AM (#12208325)
>and all my contacts with the community were very unpleasant

I can testify to this! I even got banned from the golang subreddit :-D

EDIT: I didn't bully anyone or anything, just told them that they can't call the language as golang, because when I had asked feedback on my work an year ago, the only feedback I got from a certain person and that too very rudely was "to not call the language Golang and call it Go, ruby is called ruby and not rubylang"

Re:I Love Go; I Hate Go by nindalf on Tuesday August 02, 2016 @06:29AM (#12208902)
> > all my contacts with the community were very unpleasant

> I can testify to this

Even though you showed up on the golang subreddit, asked a question about javascript [1], got two answers (one without jquery, one with), you can attest to the unpleasantness of that subreddit? Even when you posted your todo manager written in Go, the majority of the feedback you got was positive.

I find your reaction a little surprising.

[1] - https://www.reddit.com/r/golang/comments/44g3ln/help_require...

Re:I Love Go; I Hate Go by thewhitetulip on Wednesday August 03, 2016 @03:24AM (#12216246)
You are right, by "community" I meant the core team and not the reddit community. they have been awesome (except the core team). I got a lot of positive feedback about the todo manager and the book. My apologies for the unclear comment.

When you look at the Go ecosystem there are two classes: 1. core team (the elites) 2. others (us plebeians)

The parent post has a brilliant line, which made me laugh for half hour:

>I wanted to check an invariant; how does Go do assertions? Fuck you, you’re a bad programmer. That’s how.

the others are awesome, my interaction with the core team was far from pleasant. They are rude and outright snarky. They focused on the book title more than the content and didn't even bother to read the content. I mean they did take a cursory glance, but the others on reddit were amazing:

https://www.reddit.com/r/golang/comments/3zle8c/i_am_writing...

https://groups.google.com/forum/#!searchin/golang-nuts/suraj...

This is how I got banned from the subreddit. Anyways Good for me, I stopped browsing reddit that much.

https://www.reddit.com/r/golang/comments/4lj0yn/congrats_bra...

On the last link, click the downvoted comments, I deleted few comments, but yeah, that's about it, I got banned because I questioned the elites, it is called bullying!

Later I spoke with that guy himself, turns out he wasn't being rude :-D

Re:I Love Go; I Hate Go by vertex-four on Tuesday August 02, 2016 @05:00AM (#12208607)
I think that a lot of people who like Go for its channels/coroutines would like one of the BEAM VM languages - Erlang or Elixir - with its OTP. It's a bit more heavyweight, and the community is a bit smaller than Go's, but it works nicely for lots of sorts of problems.

I'd keep using Go for one-off scripts (grab SSH keys from LDAP for sshd, that sort of thing) and system integration stuff, though.

Re:I Love Go; I Hate Go by clessg on Tuesday August 02, 2016 @06:16AM (#12208870)
> the community is a bit smaller than Go's

For now! Phoenix [0] will hopefully help turn the tide.

I switched from Go to Elixir/Phoenix a year ago and I couldn't be happier. I've used a lot of web frameworks over my decade as an engineer, and Phoenix is the first one that has remained fun to use, fast (!), and productive.

Crucially, its community has remained accepting and helpful under Jose's leadership - in contrast to the unfixably toxic Go community.

[0] http://www.phoenixframework.org/

Re:I Love Go; I Hate Go by themihai on Tuesday August 02, 2016 @07:55AM (#12209234)
what about the lack of static typing?
Re:I Love Go; I Hate Go by vertex-four on Tuesday August 02, 2016 @10:38AM (#12210257)
Elixir and Erlang both actually have static typing in the style of Facebook's Flow - type annotations can be added to your functions[0] and there's a tool, Dialyzer[1], which can be run via Mix[2] to type-check your programs.

It's not perfect - among other things, it can't type-check certain things that can and do happen in Erlang/Elixir programs, and won't complain about some errors - but it's better than being purely dynamic at not a whole lot more effort.

[0] http://elixir-lang.org/getting-started/typespecs-and-behavio... [1] http://erlang.org/doc/apps/dialyzer/dialyzer_chapter.html [2] https://github.com/jeremyjh/dialyxir

Re:I Love Go; I Hate Go by im_down_w_otp on Tuesday August 02, 2016 @12:13PM (#12210979)
With the recent addition of better semantics for Map type specs combined with the dialyzer flags Wunderspecs, Woverspecs, and Wspecdiffs there's nothing I've found that Dialyzer misses that I'd expect a type-checker to be able to find and warn me about.
Re:I Love Go; I Hate Go by themihai on Tuesday August 02, 2016 @07:21AM (#12209091)
Do you find using pub/extern keywords more elegant than a simple capitalization? To me rust is verbose in many cases like java with a lot keywords heading towards C++ complexity which is exactly what Go tries to avoid. I understand that now crago becomes somehow part of the language as the extern declarations will become "optional"/deprecated. So yeah, I hope Go won't adopt any of these fancy/XXI century features.
Re:I Love Go; I Hate Go by dpc_pw on Tuesday August 02, 2016 @06:54PM (#12214069)
Let me see... instead of having to capitalize every single usage of a given symbol, I can just prefix it's defintion once with `pub`? Yeap, I rather do that. Instead of replacing all instances to lower case, I can just remove the `pub`. It's obviously better.

Rust is noisy in other parts, for other reasons (trying to explain to compiler how to write super fast and data-race free code). But visibility qualifiers are not a problem.

`extern` is only for importing crates, which is like 10 lines at in whole package/crate. Irrelevant.

Re:I Love Go; I Hate Go by garfij on Wednesday August 03, 2016 @11:07AM (#12218457)
Just for contrast, when I'm exporting something in Go, using gorename makes it very easy to fix all the references within the package. It works the same when I'm un-exporting something as well. However, when un-exporting I have to go though all other packages that use that identifier and fix the code that used it. Presumably you need to do something similar when you remove the `pub` (i.e. It's not just a simple removing of the pub unless nothing used it to begin with).

Ultimately in the end, for this example it really seems like the same amount of work. You add one word, I run one command.

Re:I Love Go; I Hate Go by tatterdemalion on Tuesday August 02, 2016 @09:21PM (#12214855)
> I understand that now crago becomes somehow part of the language as the extern declarations will become "optional"/deprecated.

You are incorrect on multiple fronts - 1) there is not even an active proposal to this effect, its just an idea that was passed around and not even really discussed, 2) the idea did not involve making rustc depend on cargo at all. It would be shocking to me for the Rust community to ever accept a proposal which required rustc to depend on cargo.

In general, please try to avoid contributing to the spread of misinformation by not stating as facts things you are not very confident are true.

Re:I Love Go; I Hate Go by biztos on Tuesday August 02, 2016 @07:04AM (#12209027)
For your unit-testing problem, I highly recommend `testify/assert`:

https://godoc.org/github.com/stretchr/testify/assert

Re:I Love Go; I Hate Go by kasey_junk on Tuesday August 02, 2016 @07:36AM (#12209150)
The fact that golang ships with a unit test library that does not contain equality assertions is aggravating. Their political stance on it is just one of many places the language designers come off less as opinionated and more as that they know my problem sets better than me.