3 ms·
> or Go. If you like Go, try Nim - it's like Go but without all the dogma. I wrote a blog post about my little Nim project: https://klibert.pl/output/slock_in_
by klibertp 11y ago
> or Go.
If you like Go, try Nim - it's like Go but without all the dogma. I wrote a blog post about my little Nim project: https://klibert.pl/output/slock_in_nim.html https://klibert.pl/output/slock_in_nim.html
> Why should I choose Python 3 for my new projects?
You shouldn't unless it fits all the constraints of your new project. Choosing a language is not, for the most part, a technical decision: sure there are language features and implementation features (those are separate matters!), but in the end it comes down to external factors: your experience with a particular paradigm, your taste in syntax, skills of potential collaborators and so on.
One thing of note, though: there is no rule saying that you can't use more than one language for your project. On the contrary, you can mix-and-match languages with relative ease nowadays (see https://klibert.pl/output/python_interop.html https://klibert.pl/output/python_interop.html) and, in my experience, it works rather well. For example, in one of my projects I need to scrape a bunch of websites for data and then process this data. I wrote scraper in Elixir, which made dealing with network errors and parallelizing requests a breeze, and used Python with Pandas for the analysis part. It was a very pleasant experience: neither Python nor Elixir were up to the task on their own, but they worked very well together. It's even easier when you use a JVM, .NET or JavaScript-based languages.
- muraiki 11y agoIn Nim, isn't it the case that concurrency is thread based? Something I really like about Go is that goroutines are cheap green threads, not full OS threads. This lets me spawn as many goroutines as I like without worrying about exhausting a thread pool.
- klibertp 11y agoThere is some support for coroutines with async/await (http://nim-lang.org/docs/asyncdispatch.html http://nim-lang.org/docs/asyncdispatch.html), but I don't know how mature or functional it is, never tested it. As mentioned, for anything involving concurrency I'd rather use Erlang or Elixir; but it may be a good idea to see how well Nim does in this area.