Great news! I wish they invested a bit more to the concepts though.
How so?
Nim 0.13.0 has been released
51–60 of 80 posts
Re: Nim 0.13.0 has been released
#52Earlier quoted context omitted.
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…
>Are completely different things (the latter is actually an error). Why is the latter an error?
In Common Lisp you can work around this by using a special syntax: `|-1|`, which forces reading the thing inside as a symbol. You can then define functions and call them this way:
(defun |+1| (x) (1+ x))
(|+1| 1) ;; => 2
[1] `1-` too, of course.Re: Nim 0.13.0 has been released
#53Earlier quoted context omitted.
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.
Yeah, I feel your pain. This is a deal breaker for me. My OS of choice for the last 25 years has a case sensitive filesystem, all the programming languages I learned (well, except PHP) are case sensitive, it is too hard to unlearn. BTW, PHP has weird case sensitivity rules. Case sensitive (both user defined and PHP defined): * variables * constants * array keys * class properties * class constants Case insensitive (b…
Re: Nim 0.13.0 has been released
#54Earlier quoted context omitted.
Actually, VariableName != variable_name You can write ClassesLikePython and variables_like_python in Nim. Sometimes people end up having dangerously similar variable names in the same scope, e.g. username and user_name, where an incorrect tab-completion might introduce a bug. Nim would require the developer to choose better names.
Two identifiers are considered equal if the following algorithm returns true: proc sameIdentifier(a, b: string): bool = a[0] == b[0] and a.replace(re"_|–", "").toLower == b.replace(re"_|–", "").toLower So, right, looks like it is case sensitive for the first character allowing the same convention from Python. Still, I find it dangerous: m_insensitive == min_sensitive
Re: Nim 0.13.0 has been released
#55Earlier quoted context omitted.
Why would you need to unlearn it? Simply write code as you would write it in a case sensitive language.
I've been programming Python for a living for the last 8 years or so. In Python there is a convention for naming classes with `CamelCase` and instances with `snake_case`. I could do that in a case insensitive language, but I can't do this in Nim because it is not only case insensitive, it violates the "principle of least astonishment" by normalizing variable names in a way that makes `FooBar` equivalent to `foo_bar`…
And you can always just learn another naming convention. That's not hard. Almost every language comes with its own way of naming things. For me - I'm using really a lot of languages at the same time - it's actually helpful because it makes easier to tell which language I'm writing right now...
Re: Nim 0.13.0 has been released
#56Earlier quoted context omitted.
>Are completely different things (the latter is actually an error). Why is the latter an error?
In Lisp, a parenthesized expression is a function call by default, if not explicitly transformed in some way (for example with `quote`). `(f 1 2 3)` would be written as `f(1, 2, 3)` in other languages, and `(f)` would be `f()`. So `(-1)` would translate to `(-1)()` which doesn't make sense. Well, not exactly, as for example in CL and Elisp you have a `1+` function[1], which... well, adds 1 to its argument. The differ…
> `|-1|`
Is there a name for that | operator - if it is one?
Re: Nim 0.13.0 has been released
#57Earlier quoted context omitted.
Because in America, the name "Nimrod" is almost exclusively recognized as the epithet applied by Bugs Bunny to the hapless hunter Elmer Fudd, so the name of the language sounded risible to a lot of people: https://news.ycombinator.com/item?id=8351773
Interesting. In the UK, the word Nimrod is recognised (if at all) as a piece of classical music by the British composer Edward Elgar (from his work Enigma Variations) https://www.youtube.com/watch?v=sUgoBb8m1eE
Re: Nim 0.13.0 has been released
#58This has always been a pretty cool project. While some have said Araq has a case of NIH (probably true), I've found it very nice that Nim and the whole ecosystem around it is as polished as it is. It also means there's a good amount of example code out there.
There is good forum software out there. This thing that Araq wrote in his spare time is not good forum software. It is outright painful to participate in a discussion there.
Re: Nim 0.13.0 has been released
#59Earlier quoted context omitted.
> In general (not all the time, but often), things that look different should be different Case-sensitivity is the opposite though: it's making two things that look the same be different. I could maybe support a rule (or even just a linter) that each variable had to be written in a consistent case throughout the project, but two different variables that differ only in case should definitely be disallowed, IMO. > It w…
> Case-sensitivity is the opposite though: it's making two things that look the same be different. I can see why you would say that, but (as my comment suggests) I'm with wtetzner ( https://news.ycombinator.com/item?id=10932471 ) on this one: I think that `variable` and `VARIABLE` look different. I am willing to believe, though, that this may just be a result of my training (as a mathematician); my students often gen…
Re: Nim 0.13.0 has been released
#60This has always been a pretty cool project. While some have said Araq has a case of NIH (probably true), I've found it very nice that Nim and the whole ecosystem around it is as polished as it is. It also means there's a good amount of example code out there.
I enjoyed starting to learn about Nim, but the worst case of NIH is the forum. There is good forum software out there. This thing that Araq wrote in his spare time is not good forum software. It is outright painful to participate in a discussion there.
What would you say should be improved in the forum to make it less painful to use?