Earlier quoted context omitted.
> Which means you can declare an interface that foreign packages already conform to, and then freely use them. But you cannot do the reverse: you cannot make a type from a foreign package conform to your interface by adding new methods to it. This is because, with structural typing, it's not safe to add methods to types in other packages, since if packages B and C both were to add a conflicting method Foo to a type f…
> But you cannot do the reverse: you cannot make a type from a foreign package conform to your interface by adding new methods to it. I thought you could. You don't add the methods directly to it, but you can easily embed the foreign type into a new type that confirms to the interface you want. type FooWrapper struct { Foo } func (fw FooWrapper) SomeFunc() { ... }
Go 1.6 is Released
151–160 of 367 posts
Re: Go 1.6 is Released
#152There was some discussion leading up to the release about whether to merge the "SSA" branch, which seems to be a refactor that allows for easier compile time optimisations but also slows compile times for the time being. Does anyone know if that was included in this release?
Re: Go 1.6 is Released
#153Earlier quoted context omitted.
> What Go is lacking at this moment in my opinion is: 1) A comprehensive and mature web framework. Play w/ Scala is my go-to choice now, with Django a very close second. I completely agree here. GIN is my fav framework so far, but it falls down sometimes on documentation and also on features. A lot of features. I know there are three viewpoints with Go. 1) Use net/http and just import libraries. 2) Use a "lightweight…
Have you looked at Revel? https://revel.github.io/
I prefer GIN. :)
Re: Go 1.6 is Released
#154Earlier quoted context omitted.
Java also can't beat Go's concise syntax. Even compared to writing in IntelliJ, an awesome IDE for saving keystrokes, I relish the simplicity and brevity of Go code.
How can Go be concise when you can't do f(g(x)) without two if-statements to check for errors?
Re: Go 1.6 is Released
#155I've really enjoyed the time I've spent with Go but feel like the state of dependency management has kept me away. Am I being stubborn in my longing for an npm, Ruby Gems, or pip? Is there a reason why one of these hasn't emerged/been adopted by the community? (I'm aware of the 1.5 experiment with vendoring.) Semver and pinning versions has always just made sense to me. I can easily adopt new features and fixes autom…
Re: Go 1.6 is Released
#156Earlier quoted context omitted.
Go starts very fast compared to jvm. Go compiles into a binary that does not require a jvm to be installed... Go does not require an IDE to develop in... Go is also less verbose
Java doesn't require an IDE either: emacs/Ant/Maven is all I've ever used. Barring specialized platform-specific toolsets (like Android Studio) you don't NEED anything else (you might WANT something else, but that's a separate issue...)
Re: Go 1.6 is Released
#157The reason I love Go is that every time I pull it out, I write a small amount of it and it runs beautifully. For example my company has a critical micro-service implemented in ~300 lines of Go, it's been running for six months now without a single hiccup, highly performant, very sexy. The reason I will almost never use Go for web apps is because interaction with databases is limited (almost entirely) to raw queries.…
> The reason I will almost never use Go for web apps is because interaction with databases is limited > but it's a huge drop in efficiency to spin my own SQL. Sorry, I have to disagree. I come from PHP, where when you sneeze an ORM appears. I actually am a DBA also. I am very familiar with SQL and I love writing out raw SQL. I don't see this as a limiting feature. It doesn't affect me at all. There are ORMs for Go as…
My previous job did a PHP -> go transition. I felt like it went well.
Re: Go 1.6 is Released
#158Go has a lot going for it. That said, there were a few points I noted, based on a recent go I gave it (pardon the pun), at least in relation to my style of development for this project: 1. It's hard to tinker, mostly because it's fussy about what variables are defined or used. This is a strength in the usual course, but when one is trying to posit what a poorly documented 3rd party API is doing it can be a serious pa…
It's so damn arbitrary, though; it refuses to let you have unused imports (which is not a source of bugs) but will happily allow you to shadow variables (which is a serious source of bugs) without even warning you. Super weird.
Re: Go 1.6 is Released
#159Earlier quoted context omitted.
I agree Erlang is probably not the correct fit for the average startup, but for some areas it is essentially unparalleled (and businesses have had great success with it). Consider the online advertising industry, for instance -- in order to guarantee the kind of uptime and debuggability that real-time bidding and decision making on ads requires, Erlang is an excellent choice (cf. https://www.youtube.com/watch?v=qURhX…
Go is great for RTB as well. Easy concurrency that scales very well. Anecdotally it seems a lot easier to hire for than Erlang/functional languages.