top | item 4154227

Should I use Go or Javascript?

8 points| bprieto | 13 years ago | reply

I used to be good programming in C, but left programming for more managerial roles. Now I want to do a web app as a personal project, and I would be grateful if you could give me some help deciding the language. I can hack some PHP, and have been playing with python/Django.

For what I have read, I think that Go or Javascript would be easier with my C background, but I don't know if I would be better with a more standard route, as in some PHP framework or Django, for the support, libraries and docs. I see a lot of frameworks both for node.js and Go, but I'm not sure if they are stable and evolution is somewhat guaranteed.

10 comments

order
[+] kintamanimatt|13 years ago|reply
My advice would be to play with both. I feel you're almost posting this to avoid making a mistake, but mistakes are the seeds of learning and sometimes even the foundations of cool things!

This is one of those times you can play with a language just because it interests you, and for no other reason than that.

If you're really stuck, toss a coin to decide which to play with first.

[+] bprieto|13 years ago|reply
Well, you know that thing about people being more careful spending their own money than spending other people's money... this is the same, but with time. It's my project, but it wouldn't be fun to toss everything six months down the road. Sure I would have learned something, but still... any way, thank for your comment, maybe I'll do the coin thing (and try not to look back)
[+] ams6110|13 years ago|reply
If you were really a good C programmer, you can program in almost anything.
[+] fossley|13 years ago|reply
As a C programmer, this is flattering, but I also know it isn't true. I wrestled with Erlang for a good while before I got the hang of it. Going from C up the tree of C-like programming languages has its disadvantages.
[+] bprieto|13 years ago|reply
I'm afraid I can't. Or at least I can't do it in a reasonable time. There were times where I could be programming for ten or twelves hours a day. Now I'm lucky if I can get two straight hours without interruptions. So I need to optimize my time.
[+] SoftwareMaven|13 years ago|reply
If you just want to "get stuff done", go with Python/Django.

If you want to explore concurrent programming, do more "systemy" stuff, or play on the leading edge, use Go.

If you want to explore event-driven programming, go with JavaScript or Python/Twisted.

You will probably spend more time figuring out how to do stuff in Go, since it is relatively new with less documentation and 3rd party libraries. That might be advantageous to rebuilding your coding chops but will make things take longer.

Server-side event programming will twist your brain around for a while, but you'll have lots of company around to guide you.

Python is just a stalwart choice for getting stuff done, with enough ability to do meta-programming that you can get it done quickly.

[+] fossley|13 years ago|reply
Knowing both C and Javascript, and loving them both ... I would go with Python+Flask as the sensible choice. However, Go is a cracking language but not all that mature. Javascript is great if you use a decent framework too.

As a C programmer though, I read http://startupitis.blogspot.co.uk/2012/05/golang-its-amazing... and had to write some Go and didn't regret it. Not sure about its fit for web development, but good fun anyway. You may find yourself writing boilerplate with Go though.

Just play with them and see which you enjoy most. Enjoyment pays you back in productivity/motivation.

[+] bprieto|13 years ago|reply
Thanks, I also considered briefly Python+Flask. Might be worth to give it another look.
[+] ha470|13 years ago|reply
If you've been hacking with PHP or python/django, pick one of those and try to get as far with it as you can. You'll have to learn JS for the client-side portions of your app, anyway.

I don't think Go or JS's similarity to C syntax will help much, as you'll get used to python or PHP's syntax intricacies relatively quickly. As you mentioned, PHP and Python having more support will help a lot, too, both with libraries and with support on StackOverflow/the web when you're stuck.

[+] aidenn0|13 years ago|reply
Just pick up one and run with it. You've probably already spent as much time pondering this question as the value you would save by picking the better option.