News for hackers. Stuff that matters.
Re:The Rise of Microsoft Visual Studio Code by mrdoops on Thursday December 06, 2018 @04:29PM (#18622445)
Go is a language designed to take CS college graduates to productive engineers at Google with as little fuss as possible. Considering it was designed for an organization in the scope of Google, it's less likely to be the best option for something like a startup, small business, or even a medium size business.
Re:The Rise of Microsoft Visual Studio Code by mawburn on Thursday December 06, 2018 @05:03PM (#18622771)
I feel like you should spend some time with Go. If I were building a startup, I would probably choose Go for core infra for being able to move quickly as a developer and write incredibly performant code with about as much mental overhead as most dynamically typed languages.

Anecdotally, I've seen it replace Java in quite a few small and medium sized established companies.

Re:The Rise of Microsoft Visual Studio Code by Waterluvian on Thursday December 06, 2018 @06:20PM (#18623505)
I feel like Python is your pepperoni pizza can't go wrong option for almost anything.

Go feels similar but younger. I love languages with big standard libraries. Just need their package management story to settle down for a while.

There's something wonderful about a language being so popular and around for so long that there's plenty of resources and answers on just about anything. I think that's a core part of what I'm missing from Go.

Re:The Rise of Microsoft Visual Studio Code by nothrabannosir on Thursday December 06, 2018 @07:11PM (#18623880)
Python can go wrong for large codebases. There are exceptions, of course, but if I focus on the consensus: large code bases in a dynamic language have an anecdotally significant likelihood of becoming unmaintainable. It's a glass ceiling that almost everyone I've met, who has done serious work with a dynamic language, has encountered.

There are ways to deal with it, but it requires rigorous discipline, and resisting Python's dynamic siren call earlier on in the process.

Golang naturally guides you into a style of programming which scales. You're not fighting the language (or your own inclinations) to avoid getting entangled later on.

Everything has exceptions†, you can shoot yourself in the foot with anything, yes. But, reasonably, it's about the relative struggle to end up in a similar place. Which is higher for Golang initially, but higher for Python later on.

Not trying to turn this into a Python vs Go thread; they both have their place. But Python can definitely go wrong, in an area significant to many people.

† Except Go... T_T

Re:The Rise of Microsoft Visual Studio Code by nikanj on Thursday December 06, 2018 @08:14PM (#18624256)
Most of the workarounds seem to boil down to de facto static typing in function signatures. That is, using annotations / rigidly formatted comments to provide the type information necessary for IDE support.
Re:The Rise of Microsoft Visual Studio Code by Waterluvian on Thursday December 06, 2018 @07:30PM (#18624013)
Yeah I'm inclined to agree the more I think about it.
Re:The Rise of Microsoft Visual Studio Code by meowface on Thursday December 06, 2018 @06:26PM (#18623556)
If Go adds generics and a smoother method of doing error handling, I could see it eventually taking Python's place. It already is doing so to an extent, but with those features plus everything else it can do better than Python, it'd be tough to beat. 95% of my programming is in Python, and I honestly don't really enjoy coding in Go that much, but with those changes I could see myself switching.
Re:The Rise of Microsoft Visual Studio Code by Waterluvian on Thursday December 06, 2018 @06:29PM (#18623575)
Same. 99% of my back-end and robot code is Python. Maybe this is a grass is always greener kind of thing but I'm hitting projects of a size where I miss static typing.

I will say that asyncio is amazing and really solves concurrency for me. But Go looks like you also get parallelism without a lot of work.

Re:The Rise of Microsoft Visual Studio Code by 1996 on Friday December 07, 2018 @08:31AM (#18627454)
Asyncio is good but it will not give you true parallelism: asyncio still uses the GIL, on a single thread
Re:The Rise of Microsoft Visual Studio Code by Waterluvian on Friday December 07, 2018 @02:46PM (#18630898)
Yep. Concurrency is not parallelism. But a lot of the time it's just not necessary.
Re:The Rise of Microsoft Visual Studio Code by pjmlp on Friday December 07, 2018 @03:46AM (#18626055)
On the other hand if Python community had more love for PyPy, to follow up on JavaScript and Julia footsteps, maybe that wouldn't be even an issue.
Re:The Rise of Microsoft Visual Studio Code by closeparen on Thursday December 06, 2018 @11:54PM (#18625232)
Go targets a number of performance sensitive systems programming contexts where Python would be completely inappropriate.

Its beauty is that there is so little to it. You don’t need StackOverflow to discover/debug a clever way of expressing something because there is no clever way. It feels limiting until you learn the idioms.

Package management has indeed been extremely painful, particularly in the Glide era, but Dep and VGO are both solid.

Re:The Rise of Microsoft Visual Studio Code by netheril96 on Thursday December 06, 2018 @08:50PM (#18624442)
Python is wrong for anything performance sensitive (unless the performance part is already written in C/C++, like TensorFlow).
Re:The Rise of Microsoft Visual Studio Code by goliatone on Friday December 07, 2018 @02:06AM (#18625689)
Performance sensitivity is a rather relative line, I understand your point but I’ve heard people argue that C was the performance sensical choice as opposed to C++, or assembly rather than C. I love python but I wouldn’t use it for everything. I really enjoy Go but the use cases for me are smaller than most people I know that use Go daily. At work we have to use Go and I’ve had to make the argument to use JVM for some services and Erlang/Elixir for other use cases. I could’ve done everything in Go, but it really felt more dogmatic than pragmatic
Re:The Rise of Microsoft Visual Studio Code by Nimitz14 on Thursday December 06, 2018 @05:36PM (#18623121)
> I would probably choose Go for core infra for being able to move quickly as a developer

At the company I used to work at it took nearly a 1000 lines to replace an 80 line bash script. So I can't help but laugh at this statement.

Re:The Rise of Microsoft Visual Studio Code by barbecue_sauce on Thursday December 06, 2018 @06:05PM (#18623374)
I've helped port some bash-based CLI tools to Go. The amount of code produced was pretty similar, just some overhead for typing and adapting some of the `awk` and `sed` functionality to be self-contained in the program. What kind of stuff was this 80 line bash script doing that resulted in over 12.5 times more code?
Re:The Rise of Microsoft Visual Studio Code by feketegy on Thursday December 06, 2018 @05:51PM (#18623243)
Since when LoC is a meaningful metric?
Re:The Rise of Microsoft Visual Studio Code by dogma1138 on Thursday December 06, 2018 @06:45PM (#18623689)
Since always but it depends on what you actually take into account.

More LOC means more opportunities for error, and more resources needed to review that code and more time required for a new developer to get familiar with the code base.

That said if you have 85 LOC vs 1000 it usually means that the 85 LOC “app” used a metric ton of external dependencies which are on their own a good source for problems.

When comparing apples to apples (as in both apps use dependencies equally) I don’t see how such delta can be caused by using a different language, even using assembly would likely not cause this much inflation.

Re:The Rise of Microsoft Visual Studio Code by feketegy on Friday December 07, 2018 @04:34AM (#18626253)
I LOLed on this one :) I can literally double LOC in any project, just by putting { } on separate lines
Re:The Rise of Microsoft Visual Studio Code by dogma1138 on Friday December 07, 2018 @05:31AM (#18626487)
If you LOLed at this one you likly don’t understsnd how LOC are counted.
Re:The Rise of Microsoft Visual Studio Code by TheOtherHobbes on Friday December 07, 2018 @03:35AM (#18626008)
How well did the bash script handle exceptions?
Re:The Rise of Microsoft Visual Studio Code by vrazj on Thursday December 06, 2018 @05:52PM (#18623247)
I can replace those 1000 lines with a bash script of 1 line that just calls the Go program ^_^