News for hackers. Stuff that matters.
Re:400 days of Go by arihant on Tuesday September 15, 2015 @06:45AM (#10219873)
I love Go, 90% of my company's codebase is in Go. But I can't ignore the Kool-Aid in this article.

I don't see why people have perception of IDE being a bad thing. In past 15 years or so, I have never been in a situation where I was on a system where some IDE was not supported, and I wanted to use it.

They are everywhere, just like vim. That's like mocking the Gmail cause it needs a browser, while praising mutt cause you can be lost in Jurassic World with an Apple II which cannot run Chrome.

The build times of Go 1.5 are not that fast. That point is not that valid. I also don't see much point in have competition of build times among languages that compile to binary. Rust, Go, C are all fast enough.

I'm sure he has good points below (I see testing as one), but he started out bashing Java, after which I genuinely did not want to read the article. I'm not a Java fan, but I find the language extremely non-assuming, very less opinionated and quite useful. If Go one day has half a million repos of libraries, given it's composability features, it will have names just as fugly as some Java classes. Java's standard libraries are actually very clean.

Re:400 days of Go by mseebach on Tuesday September 15, 2015 @07:08AM (#10219923)
There's nothing wrong with an IDE per se -- but it's a smell when a language is so verbose that it effectively requires a machine to help you write it, which is definitely the case for Java.

It's just a smell, it's not disqualifying, because, as you correctly state, rare are the times when you can't just run the IDE. But I think it's a perfectly fair point that the language you can write effective in vi is -- all other things being equal -- better than the language that requires an IDE.

Re:400 days of Go by yokohummer7 on Tuesday September 15, 2015 @08:17AM (#10220163)
> it's a smell when a language is so verbose that it effectively requires a machine to help you write it

The funny thing is that this feature also explains what Go is. Go relies heavily on the various tooling just to overcome the deficiencies of the language. It's just that they didn't choose IDE as a primary target, but instead various ad hoc tools.

For example, when I find the unused imports being a hard error inconvenient, a typical suggestion from Gophers is "just use an editor plugin that automatically handles that". This is exactly the same attitude that can be found in the IDE lovers.

And that's why I don't like Go anymore. In the name of the simplicity of the language, they concentrate on building more and more tools, rather than fixing the language. I'm pretty sure if Go acquires generics someday, it will have the form of code generation, which is proven to be awkward. (I heard "go generate" already does a part of that?)

Re:400 days of Go by sagichmal on Tuesday September 15, 2015 @08:55AM (#10220338)
Those "various ad hoc tools" are literally the UNIX philosophy applied to language design. It's cool if you don't like it, but call it what it is, and realize you're really objecting to a whole ethos, not just a single instance of it.
Re:400 days of Go by lobster_johnson on Tuesday September 15, 2015 @11:04AM (#10221047)
The example the parent picked — unused imports being an error — isn't an instance of Unix philosophy at all.

Unused imports flagged as an error is great for production code, but infuriating during developing, when you need to work with a lot of tentative code, the most basic of which involves printing.

Having to add, remove, then re-add "fmt" or "log" just to keep the compiler happy is not a Unix-philosophical issue around language design, it's just an unnecessary strictness.

Go is "opinionated", but it tends to err on the side of impracticality, a kind of distorted, prematurely-optimized YAGNI that disrupts developer efficiency in the name of simplicity. "go get"'s obstinate simplicity is firmly in this category.

Go gets a lot of stuff right, of course. And the tools — the "go" tool, compiler toolchain, gofmt, debugger, godoc etc. — are clearly good Unix citizens, of course.

Re:400 days of Go by sagichmal on Wednesday September 16, 2015 @09:38AM (#10226445)
> Unused imports flagged as an error is great for production code, but infuriating during developing, when you need to work with a lot of tentative code, the most basic of which involves printing.

This sentence has baked into it a context which is not universal. Namely that "during developing" you are "work[ing] with a lot of tentative code". That's simply not how I, nor many others, develop. Even on the very first sketch of a program, I'm writing complete, valid types and functions. I code all of the error paths completely as I encounter them. For very large first drafts, I'll often stub methods or types, but I never leave the program in an invalid state and "try it out". (Tangentially, for what I suspect are similar reasons, I never quite understood why anyone would care so much about REPLs.)

All of the tentativity, so to speak, has been expressed and explored in my head and on paper beforehand. Go is a language that rewards, perhaps even demands, this style of development. If that's not how you operate, Go will feel like it's fighting you. But that's not a universal critique of the language, that's a very specific critique of your specific operating context.

Re:400 days of Go by lobster_johnson on Wednesday September 16, 2015 @11:31AM (#10227343)
I'm pretty sure you are in the minority — REPLs are provably immensely popular, for example (I've never heard anyone criticize their usefulness).

Sometimes I write code like you do. At other times I'm "feeling out" a solution and want the language to not fight my half-baked, messy (but syntactically valid!) program. At other times I'm writing a quick and dirty script I will use today and never after; it doesn't need to be pretty, only functional. But Go wants your code to always be fully realized and clean, which just doesn't mesh with reality.

We don't need "universal critiques". Everyone has a style, and a good, mainstream programming language needs to be receptive to those styles.

Re:400 days of Go by sagichmal on Wednesday September 16, 2015 @12:11PM (#10227644)
> Go wants your code to always be fully realized and clean, which just doesn't mesh with reality.

It certainly meshes with my reality.

Re:400 days of Go by lobster_johnson on Wednesday September 16, 2015 @12:22PM (#10227731)
Sure. Great. However, there are other realities outside yours.
Re:400 days of Go by sagichmal on Wednesday September 16, 2015 @04:35PM (#10229676)
...yes, of course. Acknowledging the diverse set of realities is the point of my original comment :)
Re:400 days of Go by lobster_johnson on Wednesday September 16, 2015 @04:41PM (#10229710)
...But the fact that it is diverse is the exact problem that Go doesn't address.
Re:400 days of Go by sagichmal on Thursday September 17, 2015 @06:05AM (#10232460)
A language isn't obliged to serve all realities equally. Quite the opposite: a language, a framework, a system -- a product -- should carve out a set of contexts that it's explicitly targeting, and fiercely guard those boundaries.

Otherwise, you get terrible products that are nothing more than the lesser sum of their features, like JIRA, or Scala.

Re:400 days of Go by lobster_johnson on Thursday September 17, 2015 @11:26AM (#10233864)
This is about basic ergonomy, though.
Re:400 days of Go by kasey_junk on Tuesday September 15, 2015 @11:44AM (#10221280)
Not commenting on the bigger picture about philosophy. But I couldn't work in go without:

https://github.com/bradfitz/goimports

Re:400 days of Go by StavrosK on Tuesday September 15, 2015 @03:47PM (#10222736)
> But I couldn't work in go without: https://github.com/bradfitz/goimports

I think this statement makes both points simultaneously.

Re:400 days of Go by lobster_johnson on Tuesday September 15, 2015 @11:48AM (#10221310)
Indeed, I use this Sublime plugin, which wraps it: https://packagecontrol.io/packages/GoImports.
Re:400 days of Go by Cthulhu_ on Tuesday September 15, 2015 @09:59AM (#10220629)
Not to mention that most IDE's (Eclipse, IntelliJ) are more frameworks to tie together various ad hoc tools into a sorta-unified UI, often even calling the underlying Unix-style binary.
Re:400 days of Go by maerF0x0 on Tuesday September 15, 2015 @10:28PM (#10224339)
IMO as engineers we're going to eventually need to get used to more productive modes than doing it all ourselves.

If a piece of software can give my team a 1% speedup, it'd be worth $40k a year. Multiply that by lots of teams, we can see there is a big market on making engineers more productive.

Re:400 days of Go by vanderZwan on Tuesday September 15, 2015 @07:17AM (#10219950)
In short, the IDE should be a productivity enhancer, not a crutch.
Re:400 days of Go by malnourish on Tuesday September 15, 2015 @10:19AM (#10220766)
Why? I hear a similar argument for things in the physical world ("well what if you lose your phone, how will you navigate then?") but this isn't an analogous situation. You won't be programming Go in a world where your IDE doesn't exist.
Re:400 days of Go by ryanong on Tuesday September 15, 2015 @11:16AM (#10221120)
No but when the GPS tells you to drive into the lake, you shouldn't drive into the lake.
Re:400 days of Go by ryandvm on Tuesday September 15, 2015 @08:31AM (#10220211)
> but it's a smell when a language is so verbose that it effectively requires a machine to help you write it

Meh. People say the same thing right before starting a Node project with Sublime. Then they proceed to write an unmaintainable mess of JavaScript. With only the original author knowing who calls what, what gets returned, interface definitions, etc.

I have yet to find a language that doesn't benefit from a capable, intelligent IDE.

Re:400 days of Go by adrusi on Tuesday September 15, 2015 @08:55AM (#10220339)
An IDE won't save you from writing a mess. For that you need good programmers, not good tools.
Re:400 days of Go by royjacobs on Tuesday September 15, 2015 @09:45AM (#10220556)
If a professional craftsman is building a house I'm sure he prefers using power tools to having to screw all screws in manually.
Re:400 days of Go by adrusi on Tuesday September 15, 2015 @11:41AM (#10221257)
Prefers it, sure, but a great craftsman could build a better house using only manual tools than I could using any tool I want in the same amount of time.

Also note that a carpenter building a house probably wouldn't choose the most powerful tools (tower crane, etc) even if financials were taken out of the equation.

It doesn't make much sense to compare go's standard toolchain to building a house without power tools. What an IDE gets you over a more unix-like toolchain is integration, nothing more. They have all the same capabilities, but an IDE is designed to make a specific prescribed workflow seamless. There simply is no good analogy for this, carpenters don't have a universal tool that acts as a nailgun, drill, power screwdriver, wrench and saw at the same time.

Re:400 days of Go by cwyers on Tuesday September 15, 2015 @10:04AM (#10220664)
Yeah. Good tools won't make a bad craftsman good, and that's as true for programming as it is for carpentry and plumbing. But that doesn't mean that good tools don't help good programmers.
Re:400 days of Go by joesmo on Tuesday September 15, 2015 @10:53AM (#10220960)
I couldn't agree more. I see a ton of code that's not formatted correctly, doesn't have proper docblocks and a whole bunch of other stuff that was obviously left out because the creators were too lazy and didn't have the proper tools that would make fixing small things like that simple and easy. This almost always comes from people who claim they don't need an IDE. If you truly don't need an IDE and can write code that's up to par with people that do have one, that's fine. But most of the time, I just hear excuses of why the code isn't clean, and I automatically assume that these people just don't care about their work at all because they're not even interested in tools that will better their code. Needless to say, I try never to work with them again.

EDIT: Other stuff that's often gotten wrong are short variable/function names and spacing.

Re:400 days of Go by arihant on Tuesday September 15, 2015 @07:19AM (#10219961)
Well, Java isn't verbose. Certain codebases have gotten verbose because they are being maintained for years (decades?) with extremely functional tools. Give a Go team IntelliJ and 20 years, and then we can compare Go and Java codebases.

> But I think it's a perfectly fair point that the language you can write effective in vi is -- all other things being equal -- better than the language that requires an IDE.

I would have to disagree with this point as well. To me, it feels like suggesting that computing is better with punch cards. Because, it is then also a fair point that a way of computing that can be done without a computer and editor is -- all other things being equal -- better than the way of computing that requires a computer and editor.

I think that thinking this way will also help numb the next leap in methods of instructing computers, and performing computation. Whether that involves a programming language or not.

Re:400 days of Go by qooleot on Tuesday September 15, 2015 @08:27AM (#10220196)
"Well, Java isn't verbose."

Maybe its just the code I've read, but its generally much longer than other languages to accomplish the same thing. A bunch of little things add up, such as "extends" instead of ":" for inheritance. Naming things is often longer - maybe its not the language core itself, but a counter example is python coding standards keeps them much shorter. With Go, there's duck typing to not have to declare obvious types (such as for strings).

The goals of the programs in enterprise java apps probably differ by an emphasis on readability and not writing speed. I.e. lambdas are written quicker to write, but maybe a reader would understand a strategy pattern's goal quicker.

Re:400 days of Go by arihant on Tuesday September 15, 2015 @11:24AM (#10221154)
Java programs got that way not because of language, but because teams of thousands of developers managing same codebase for decades. Explicitness and non-magicness are extremely valued in that environment.

Imagine you're refactoring a code written by employee #12340 that was written 10 years ago. With Go, you'd go file after file decomposing the program to finally figure out that if he just used a word to implement an interface, you only had to read that file and a javadoc. Long class names are still easier to look than signatures of functions.

Java emphasises abstraction. Go emphasises composition. Both have its uses, but what I was refuting was people claiming that Go is better than Java which I think is extremely uninformed conclusion.

Re:400 days of Go by chrisbroadfoot on Tuesday September 15, 2015 @04:10PM (#10222855)
> Explicitness and non-magicness are extremely valued in that environment.

This is not my experience with Java programs.

Enterprise Java programs often have many layers of magic abstraction, like Aspect-Oriented Programming, dependency injection, IOC.

Furthermore, people love using configuration files over code to determine program behaviour (see servlet configs, etc).

Re:400 days of Go by mahmoudimus on Tuesday September 15, 2015 @05:58PM (#10223434)
If you had said this comment 5 years ago, I would agree. I think you should take a look into today's Java development environment. It's world class, and light-years ahead of anything else out there.
Re:400 days of Go by chrisbroadfoot on Thursday September 17, 2015 @02:57AM (#10231957)
Good to hear. I haven't programmed in Java in about that much time :)
Re:400 days of Go by joshuacc on Tuesday September 15, 2015 @10:30AM (#10220817)
> With Go, there's duck typing to not have to declare obvious types

Not a Go developer, but I think you mean type inference, not duck typing.

Re:400 days of Go by stonemetal on Tuesday September 15, 2015 @11:05AM (#10221052)
Not really, Go uses duck typing for interfaces. You declare an interface to require functions X, Y, and Z. Any type that has functions X, Y, and Z suddenly implements that interface whether you want it to or not.
Re:400 days of Go by joshuacc on Thursday September 24, 2015 @02:13PM (#10273443)
As I understand it, the correct term for that is "structural typing." Duck typing is similar, but applies exclusively to dynamic languages. See: https://en.wikipedia.org/wiki/Duck_typing#Structural_type_sy...
Re:400 days of Go by threeseed on Tuesday September 15, 2015 @07:14AM (#10219947)
> but it's a smell when a language is so verbose

You call it a smell I call it functionality. Get back to me when Go is at version 9 with decades of features added and then you can talk about verbosity.

And this idea that you need an IDE to code Java is pure and utter rubbish.

Re:400 days of Go by realusername on Tuesday September 15, 2015 @07:09AM (#10219931)
For the build times, I would say it's more that C++ is really slow and the others are indeed quite okay. If you have done some work in Qt or with a library using Boost, you just hate any slow build after that.
Re:400 days of Go by hakcermani on Tuesday September 15, 2015 @08:13AM (#10220149)
And guess what Jetbrains will release a IDE for Go, written in Java ;-)
Re:400 days of Go by snapetom on Tuesday September 15, 2015 @01:33PM (#10221943)
I'm a Python/PHP dev who got my first Go job a couple of months ago. I inherited a large, disorganized codebase. IntelliJ with the Go plugin has been huge for me. The ability to highlight something and select "Find Usages" or "Go to Declaration" has been critical in helping me understand this code.
Re:400 days of Go by fit2rule on Tuesday September 15, 2015 @08:27AM (#10220193)
The IDE question can be resolved, as itself as a political issue, with one question: do you have a USER?

Because, actually, it doesn't matter a damn what tool or method you use to develop something - do you have a USER? No USER = failed project.

I'm personally of the opinion that those who depend on an IDE, in and of itself, are doing the computer world a disservice - because they are perpetuating the 'special' nature of computing by stint of becoming competent with an IDE. IDE's require an investment, they require a portion of your life - investing that portion of life in a product specifically designed to impose limits on your freedom of speech is a gamble, plain and simple. Some people win from such an action - others complain bitterly.

Either way, if your language and technology require a commitment of life, then it is either an enabling or an enslaving technology, to more or less a degree. Languages designed to free us from the requirement of using a specialized tool - which is what an IDE is - are of more or less value than languages that don't. And the key to this equation is: do you have a USER?

In short: use an IDE if it is necessary for you to gain a USER. Beyond that point however, do not promote technologies with such dependencies. The best computer technologies do not require a big investment on the part of the user. This is true of IDE's. Corollary: the more you have to invest in a technology, the less valuable it is - on the basis of how many users you eventually gain as a result.