Patten Matching in Nim
11–20 of 54 posts
Re: Patten Matching in Nim
#12s/Patten/Pattern/
Re: Patten Matching in Nim
#13The amount of power that Nim has is absolutely obscene. I don't really have a good use-case for it right now, but it's a language that I know I'd enjoy if I got into it.
Re: Patten Matching in Nim
#14The amount of power that Nim has is absolutely obscene. I don't really have a good use-case for it right now, but it's a language that I know I'd enjoy if I got into it.
Does Nim solve the "what color is your function" problem?
Basically your question is equivalent to asking whether the language has green threads. The original article describing color (http://journal.stuffwithstuff.com/2015/02/01/what-color-is-y...) says it's just threads, but it glosses over why a language like C# decided to add async-await and why Java now has its ongoing Loom project.
System threads are heavyweight and as a result usually unsuitable as your concurrency primitive for highly concurrent applications (although you can and most runtimes do build on top of threads). And so if you only have that, you inevitably get what the article calls the "color problem" (see e.g. in Java the async IO APIs, which the article laments, but doesn't explore why they exist and moreover are often preferred by Java programmers over their synchronous equivalents), because system threads aren't enough and a color-based solution inevitably must appear on top of them.
So the question to ask is "does Nim have green threads?" To which the answer is no (and then by extension it does have the color problem, in this case via async-await).
Re: Patten Matching in Nim
#15The amount of power that Nim has is absolutely obscene. I don't really have a good use-case for it right now, but it's a language that I know I'd enjoy if I got into it.
Does Nim solve the "what color is your function" problem?
Re: Patten Matching in Nim
#16The amount of power that Nim has is absolutely obscene. I don't really have a good use-case for it right now, but it's a language that I know I'd enjoy if I got into it.
Does Nim solve the "what color is your function" problem?
Re: Patten Matching in Nim
#17Earlier quoted context omitted.
Does Nim solve the "what color is your function" problem?
> The await keyword can only be used inside procedures marked with the {.async.} pragma. https://livebook.manning.com/concept/nim/await
Re: Patten Matching in Nim
#18I wonder why.
Re: Patten Matching in Nim
#19NIM seems like this unicorn of a language of having great performance, amazing balance between being both high-level and low-level, extremely approachable due to syntax ... yet very few have actual discovered and use NIM. I wonder why.
Re: Patten Matching in Nim
#20NIM seems like this unicorn of a language of having great performance, amazing balance between being both high-level and low-level, extremely approachable due to syntax ... yet very few have actual discovered and use NIM. I wonder why.
Some people prefer "There is Only One Way to Do It" languages.
Some people prefer "There is More Than One Way to Do It" languages.
Nim is more like a "There Are Seven Ways to Do It and the Eighth Way is Planned" language.