Live data from Hacker News

What makes Nim practical?

hookrace.net

31–40 of 132 posts

Re: What makes Nim practical?

#31

Earlier quoted context omitted.

> significant whitespace That's not an advantage

So says you. The entire python community disagrees, and that's not an inconsiderable number of folks.

No, the Python community consists of a mix of people who think that the manner in which whitespace is significant in Python (most languages have significant whitespace of some form) is advantageous, people who think it is neither advantageous nor disadvantageous that are attracted to the language for other reasons, and people who think that it is disadvantageous, but not so much as to negate other advantages they see in the language.

It is a mistake to conclude that because language X has feature Y, the entire community around language X thinks that feature Y is a positive feature.

Re: What makes Nim practical?

#33
post #14

Earlier quoted context omitted.

Better metaprogramming, significant whitespace, generics, etc.

> significant whitespace That's not an advantage

It's an advantage for me, not for you. I've had experience with both and I prefer significant whitespace. The only place where I found it to be a problem was in Jade templates since HTML is kind of white-space sensitive (spaces between tags cause spaces in the output). I do like programming with significant whitespace.

Re: What makes Nim practical?

#34
post #14

Earlier quoted context omitted.

Better metaprogramming, significant whitespace, generics, etc.

> significant whitespace That's not an advantage

From my personal perspective - it's a major plus when choosing a language - under the general auspices of "readability counts". I find Python-like languages much easier to read and maintain - and significant whitespace is a not-insignificant factor in that.

Re: What makes Nim practical?

#35

I keep coming back to it, and I really like it but wouldn't it be great if it had interfaces? I really want to restrict the generic type but there seems to be no way other than using templates[1]. [1]: https://github.com/Araq/Nim/blob/master/lib/pure/collections...

User defined type classes can be used for this, but they're still experimental: http://nim-lang.org/manual.html#user-defined-type-classes

Re: What makes Nim practical?

#36
post #26

I perked up as soon as I read this: # Table created at compile time const crc32table = createCRCTable()

This is not an unique feature today, you can do the same in D and Rust and even C++14, I think.

"Hey Nim, 2014 called... they want their language features back."

I jest.

But seriously, D, Rust, and C++14 are about as familiar to me as Nim.

Re: What makes Nim practical?

#37
post #36

Earlier quoted context omitted.

This is not an unique feature today, you can do the same in D and Rust and even C++14, I think.

"Hey Nim, 2014 called... they want their language features back." I jest. But seriously, D, Rust, and C++14 are about as familiar to me as Nim.

To be fair, D has had it since 2007 :)

Re: What makes Nim practical?

#38

Nim has some good ideas but I can't get over the syntax: - Significant whitespace, but tabs are forbidden - No block comments, save for `discard """ ... """` - Identifiers are case and underscore-insensitive (FOO_BAR === fooBar === fo_ob_ar)

> - Significant whitespace, but tabs are forbidden

Here's the reasoning: https://github.com/Araq/Nim/wiki/Whitespace-FAQ#tabs-vs-spac...

If you still want tabs you can add this at the top of your files and they work:

    #! replace("\t", "  ")
> - Identifiers are case and underscore-insensitive (FOO_BAR === fooBar === fo_ob_ar)

This changed recently, now the first letter is considered case sensitive: http://nim-lang.org/manual.html#identifier-equality

Re: What makes Nim practical?

#39

Nim has some good ideas but I can't get over the syntax: - Significant whitespace, but tabs are forbidden - No block comments, save for `discard """ ... """` - Identifiers are case and underscore-insensitive (FOO_BAR === fooBar === fo_ob_ar)

> - No block comments, save for `discard """ ... """`

I believe a different syntax for those will be added soon: https://github.com/Araq/Nim/issues/1535

Re: What makes Nim practical?

#40

Earlier quoted context omitted.

> significant whitespace That's not an advantage

So says you. The entire python community disagrees, and that's not an inconsiderable number of folks.

> entire python community disagrees

I can tell by the downvotes. Also, you can't prove that.

Post reply on HN