Live data from Hacker News

From Node.js to Go

bowery.io

51–60 of 192 posts

Re: From Node.js to Go

#51
>In Go, you can define different files for different operating systems that implement functionality depending on the operating system.

That sounds like it's actually very difficult to support multiple operating systems. As a developer I never, ever want to write any OS-specific code. Sure, that's sometimes required, but saying that the solution is to have multiple files, each for a single OS, doesn't sound good. It's a lot better to abstract the OS away. Node.js does this quite well. Seemingly a lot better than Go.

Besides, Node.js doesn't need to be compiled for each system. This alone makes Node.js better for writing code for multiple operating systems.

>Go is a compiled language so distributing applications for use on multiple platforms is just easier.

I disagree. You need to compile to code for every single platform, making code distribution costly. With Node.js you can simply distribute the code as it is and it probably works in any platform. (The probability is as high as it is for Go assuming no extra work for a new platform). Sure, each platform needs to have Node.js, but Node.js is supported in most platforms.

Re: From Node.js to Go

#52

Earlier quoted context omitted.

> I've noticed a lot of Rust lovers commenting about how great Rust's type system is. It probably is, but I haven't run into any problems with Go's type system. I've found it to be practical and easy to use. Go doesn't have generics. To someone coming from a language like Rust, saying that your type system doesn't have generics is like saying your car doesn't have wheels. It's just considered non-negotiable.

> saying that your type system doesn't have generics is like saying your car doesn't have wheels. To overburden an analogy, it'd be more like complaining that your tank doesn't have wheels[0], or your hovercraft. Go takes a different approach to the same problem (in this analogy, getting from point A to point B). But really, this is a rather tired flamewar that gets beaten to death literally every time a post about G…

> To overburden an analogy

Sorry. In the spirit of Go, you're not allowed to re-use this analogy; you're going to need to write another different one that can perform a similar function.

It's ok if you copy and paste some of the text from the first analogy and structure it similarly, though.

Re: From Node.js to Go

#53
So is this is a growing sentiment? Recall that TJ famously left Node.js in favor of Go.

I find Node downright amazing for web development. npm has everything you could ask for. And the whole community takes the unix philosophy and runs with it. Also love that there's no single best way to create something, you as the architect, gets to decide.

And io.js/ecma6 makes node even more appealing.

Re: From Node.js to Go

#54
post #48

This is just another generic Go vs Node post. Do we really need another post telling us about Go's concurrency/built-in features/compile benefits. This post sadly doesn't really go into much details that bowery.io is trying to solve, how Go fits that and why Node was so bad. A basic crud webapp would probably be better suited towards node and it's larger list of libraries supporting that kind of stuff. On the other h…

Fwiw, I have been doing a lot of crud work in Gonthe past few months, and haven't found it particularly burdensome. I have to write my own SQL and map it back to structs, but I consider that a good thing. I might have to write about some lessons learned.

Re: From Node.js to Go

#55
post #45

Earlier quoted context omitted.

NPM is only awesome until you need to do something with it on Windows.

What kind of problems are you having with it? I'm using npm on Windows and it's working out great! I'm actually using it as my build/task runner rather than using bloated grunt or gulp. It's easy to configure and read. I run my linter, unit test, jscs, and bundler all configured in package.json. I also install git bash and conemu to have bash on Windows which makes things much better. I don't use windows console.

My experience is that Npm "kinda works" on Windows. There are mysterious race-conditions and annoying bugs. And I'm not even talking about npm being technically completely incompatible with Windows due to the 256 character path limitation.

Re: From Node.js to Go

#56

Go does lack quite a bit of the web pizzazz you'd find in rails, but I learned a lot more by writing web things in go than I did in rails because so much less of the magic is hidden away from you.

[deleted]

Re: From Node.js to Go

#57

Go does lack quite a bit of the web pizzazz you'd find in rails, but I learned a lot more by writing web things in go than I did in rails because so much less of the magic is hidden away from you.

Go, unlike Rails, is not a web/MVC framework. It's a systems language, which is even still separate and unique from Ruby, a dynamic language. I agree you'll certainly learn more from Go than you would from Rails, but it's helpful to be aware they're very different.

Apart from my own opinion of Rails (I'll pass, thanks), it's also worth considering that Go, again a systems language, may not always be appropriate for typical web development. That's not a rule by any means. Just pick the right tool for the job.

Re: From Node.js to Go

#58
post #51

>In Go, you can define different files for different operating systems that implement functionality depending on the operating system. That sounds like it's actually very difficult to support multiple operating systems. As a developer I never, ever want to write any OS-specific code. Sure, that's sometimes required, but saying that the solution is to have multiple files, each for a single OS, doesn't sound good. It's…

>I disagree. You need to compile to code for every single platform, making code distribution costly. With Node.js you can simply distribute the code as it is and it probably works in any platform. (The probability is as high as it is for Go assuming no extra work for a new platform). Sure, each platform needs to have Node.js, but Node.js is supported in most platforms.

lmao. Fine, ship the go source code and require go to be installed on the target. "go run" and you're done.

>Besides, Node.js doesn't need to be compiled for each system. This alone makes Node.js better for writing code for multiple operating systems.

I don't think you know what you're talking about or understand what you're really saying.

Re: From Node.js to Go

#59

Earlier quoted context omitted.

> I've noticed a lot of Rust lovers commenting about how great Rust's type system is. It probably is, but I haven't run into any problems with Go's type system. I've found it to be practical and easy to use. Go doesn't have generics. To someone coming from a language like Rust, saying that your type system doesn't have generics is like saying your car doesn't have wheels. It's just considered non-negotiable.

> saying that your type system doesn't have generics is like saying your car doesn't have wheels. To overburden an analogy, it'd be more like complaining that your tank doesn't have wheels[0], or your hovercraft. Go takes a different approach to the same problem (in this analogy, getting from point A to point B). But really, this is a rather tired flamewar that gets beaten to death literally every time a post about G…

> To overburden an analogy, it'd be more like complaining that your tank doesn't have wheels

Which would be just as bad as for a car, since the things that drive and guide a tank tread are wheels (drive wheels and road wheels.)

Re: From Node.js to Go

#60
post #16

I wish a language with advanced types like Haskell or OCaml would have the same tooling and ease of distribution around it that Go does. I haven't built anything in Haskell/ML in a while, so if anyone has any updates on this please chime in.

>I wish a language with advanced types like Haskell or OCaml would have the same tooling and ease of distribution around it that Go does.

I love the philosophy behind Go and enjoy coding in the language, and the tooling is a major part what makes development in Go such a breeze. Go seems to be consistently praised for its tooling and I suspect the developers of other languages are paying attention.

Having said that, I do wish Go 1.4 retained the Vim plugin that was bundled with the earlier distributions. I've had nothing but trouble setting up vim-go and its myriad of dependencies on Windows. The process was so easy before.

Post reply on HN