Live data from Hacker News

Nim 0.13.0 has been released

nim-lang.org

11–20 of 80 posts

Re: Nim 0.13.0 has been released

#11

This is really great little language. I really enjoy using it and executables I get from it can be very small which brings smile to my face.

I like everything Andreas did differently from Python, except the unusual normalization rules for variable names. This is crazy:

    VariableName == variable_name == VaRiAbLe_NaMe

Re: Nim 0.13.0 has been released

#12
I've investigated whether or not Nim could have Python2 compatibility mode. I think Nim or any language's future could easily be secured by simply finding a way to carry on compatibility with Python2. I've wanted to offer the libre source community another path forward from CPython2.7.

Such a huge opening there for multiple parties. Unfortunately, in my research in figuring out how to do this I found that it's actually fairly difficult to provide CPython2 compatibility.

I do wish Nim the best and hope that it gains traction. More languages, more choices are always better.

Re: Nim 0.13.0 has been released

#14

Nim's approach to parallelism is, for the general industry, basically groundbreaking and inspiring work. I really wish that this language got more attention. It can fill many of the same holes that Go fills without all the awkward dependency non-management and bad error handling. Similar story for Rust, it's got a lot of similar benefits without an ownership and extent model many people find confusing.

Groundbreaking? How so?

Re: Nim 0.13.0 has been released

#15
post #6
post #2

I will definitely be keeping an eye on Nim. That aside, does anyone else find the fact that Nim treats "-1" differently to "- 1" (quotes added for clarity) a bit disconcerting?

In Lisps, this: (- 1) and this: (-1) Are completely different things (the latter is actually an error). Also in LiveScript ls> (- 2) [Function] ls> (-2) -2 Also in Smalltalk, this: -3. "=> -1" - 3. "=> Error!!!" That's off the top of my head, I'm sure there are many other languages with this characteristic. Why would that be a problem? It's just a single (or a couple) parse rules to remember (but you get other benefi…

Perhaps most notably, Haskell has the same behavior as LiveScript.

EDIT: Derp, that's not true. (- 2) == (-2)

Re: Nim 0.13.0 has been released

#16
post #2

I will definitely be keeping an eye on Nim. That aside, does anyone else find the fact that Nim treats "-1" differently to "- 1" (quotes added for clarity) a bit disconcerting?

Negative literals/negation/subtraction sharing "-" leads to odd corner cases in the grammars of quite a few languages. I'm rather fond of the J approach: -1 is the application of the negation operator to the literal one. _1 is the literal negative one. This is a very important distinction in J since you can have whitespace-delimited lists of numbers. "-1 2 3" is equivalent to "_1 _2 _3".

This is also true of Standard ML, where unary minus is ~, and APL, where unary minus is ¯

Re: Nim 0.13.0 has been released

#17

This is really great little language. I really enjoy using it and executables I get from it can be very small which brings smile to my face.

I like everything Andreas did differently from Python, except the unusual normalization rules for variable names. This is crazy: VariableName == variable_name == VaRiAbLe_NaMe

I brought it up recently in the #nim irc channel, trying to get a good explanation. The creator still seemed to think it was a good idea, and I could not convince him otherwise.

Re: Nim 0.13.0 has been released

#19

This is really great little language. I really enjoy using it and executables I get from it can be very small which brings smile to my face.

I like everything Andreas did differently from Python, except the unusual normalization rules for variable names. This is crazy: VariableName == variable_name == VaRiAbLe_NaMe

Sounds sensible. Case sensitivity makes life harder for beginners and the advantages are minimal (would you really want to have two different variables called VariableName and variable_name in scope?). There are plenty of potential pitfalls (e.g. code that only compiles in Turkey), but the principle is a great idea.

Re: Nim 0.13.0 has been released

#20
post #2

I will definitely be keeping an eye on Nim. That aside, does anyone else find the fact that Nim treats "-1" differently to "- 1" (quotes added for clarity) a bit disconcerting?

A moment's thought failed to turn up examples—which is almost certainly my fault. What is a context in which both could appear? In that context, what other languages treat them identically?

EDIT: Ah, the documentation mentions:

> This also means that `-1 is always parsed as prefix operator so code like `0..kArraySize div 2 -1` needs to be changed to `0..kArraySize div 2 - 1`.

Post reply on HN