Rust or Go? And why Go?
@eaplmx@twtxt.net Go. For the following reasons:
- Go has a simple and easy learning curve with the right balance of “languages” features
- Go is a statically compiled language with good performace
- Go has a great standard library
- Go has great tooling
- Go’s packaging (whilst some argue against) is actually pretty good
- Go has first-class concurrency
- Go’s concurrency model (CSP) lets you model concurrent programs linearly making concurrent programs easier to read
- Go has a focus on readability
- Go compiles insanely fast (if you avoid using CGO)
- Go doesn’t support silly things like classes which is fucking great!
- Go supports actual good reuse with interfaces and interface types
- Go supports functional programming (yes it does!)
- Go is awesome!
PS: I quite like these random #randomQuestionsOfTheDay posts of yours 😅
@abucci@anthony.buc.ci Sadly for me I could never (and still can’t) get into more pure functional languages. I struggled with Haskell in my under-grad some ions ago and well I like and enjoy some aspects of functional programming, just not all of it. Also the JVM irks me 😅
@prologic@twtxt.net I guess I need to do something useful on Go since I have only learned the basics and I didn’t reach all this awesome you mentioned.
Rust was too much for me at this stage, but it’s the hot language right now, so I always have the doubt if it’s something sensible to learn next year.
@prologic@twtxt.net hehe 😁
@eaplmx@twtxt.net Don’t learn the hot 🔥 🥵, Learn the practical thing 🤗 🤣
Go for me replaced Python. My main two language of choice these days are Shell and Go.
@abucci@anthony.buc.ci I tried to learn Scala when it was trendy (I think it was when Twitter switched from Ruby to Scala), but the lack of documentation in Play Framework was a roadblock (I kind of hate Java, BTW). By 2022 is Scala any good?
@prologic@twtxt.net That’s why I dusted off PHP 5.6 to learn the updates on 8.1 👀’
@prologic@twtxt.net I like Python so much, but the performance is horrible for a big scale. I was betting on Nim but doesn’t have all the benefits you mentioned before. I think, and a trust you, that Go could be that Python replacement.
It depends what you want to do , I use different languages for different use case :
- Python is good for AI and small Linux management things
- Java is good for big data pipelines
- Go is good for API, programs, tooling and others things
- Nodejs is good for Web UI.
It is like a database you should choose wisely depending of your use case.
Btw Go is also good for networking. And
C# has a very beautiful reflection library I still prefer go but I may think in C# if I have to deal with a lot of reflection.
@tkanos@twtxt.net I agree! I like C# a lot, but I’d go with Script languages (Python, JS, PHP) for quick prototypes. Even working JSON with recent versions of C# takes a lot of Dev time.
As a user of programs, it makes me groan to see a program written in anything but C or C++. In just about every other language, it’s too easy to manage dependencies, and two problems arise.
- Microdependencies
- Feature creep because you can do x in 3 lines of code by adding this giant dependency. (Why does gron need HTTP download support?)
@mckinley@twtxt.net Agree on “micro dependencies” (NodeJS / NPM ecosystem is quite guilty of this); however I think this comes down to some level of “good practise” and “good code hygiene” – I don’t necessarily think its the language’s fault or the tooling.
Re gron
, to be fair, net/http (including client and server) are part of the Go standard library. I wouldn’t complain about that as an unnecessary dependency because it isn’t, maybe an unnecessary feature perhaps? 😅
Also, because it’s so annoying to manage dependencies with C and C++, there are often flags you can set to disable functionality related to a dependency if you don’t need it.
Gron has no such option. Apparently there is no reason why you wouldn’t want a text processing program to make network requests.
@abucci@anthony.buc.ci Gotcha 👌