lainchan / λ

(untitled)

nibble · 2017-10-07 05:29
This has gotten some buzz recently Im curious about what you all think of Nim and how it compares to other young languages like Julia as well as established: Python
nibble · 2017-10-07 05:48
>>4141 I really dislike its syntax. If you wanted to write compiled code in a high level language just use crystal, which at least has the upside of ruby syntax, union types and really cool macros
Lady Jessica · 2017-10-07 05:54
>>4142 What's bad about Nim syntax? I haven't worked with it much Also why Crystal over Python & Julia? Unless you just mean Crystal>Nim
nil · 2017-10-07 08:44
>>4143 I'm not >>4142 but I agree with the syntax comment. Specifically the significant whitespace is the reason I'll never touch Nim. Code formatting and indentation should be about making your code easier to read for humans, not communicating semantic intent to the compiler.
⍕ · 2017-10-07 09:20
>>4141 Got Nim In Action by dom96 and it's pretty cool. I finished it.
Case · 2017-10-07 09:44
The world has too much programming languages.
Milner · 2017-10-07 15:00
>>4143 I did mean crystal > nim, but the syntax quirk I was really thinking of was `discard`. When's the last time you checked the return value of printf?
Switch · 2017-10-07 23:21
>>4141 yet another transpiler language >oh look, it has <favorite scripting language> syntax and compiles to C and Javascript!!!!
Technician · 2017-10-08 00:55
>>4174 >clang just compiles C++ to LLVM IR >gcc just compiles C to assembly >javac just compiles Java to JVM bytecode Nice try with your first proglang critique, but make sure you actually know what you're talking about before you soykaf on things. Compiling to C or LLVM IR is much better than writing your own optimizing compiler. "Transpiler" isn't a real thing, either.
Junichi Fujiwara · 2017-10-08 09:38
If you're passing on a language just because it does a syntax thing you don't like (such as significant whitespace, camelCase vs snake_case etc) you're a dipsoykaf. What you find beautiful and readable will change over time as you expose yourself to different languages and styles of writing, and learning a new language will almost certainly do good. I don't think Nim will ever catch on. It seems to have a few nice features, but it came about at the wrong time, around the same as Rust and Go. It doesn't have corporate backing, nor a list full of buzzwords on the homepage you can easily copy-paste (zero-cost abstractions! move semantics! trait-based generics!), nor a good idea of what the language is for, so it was misunderstood and forgotten, and people know it as "that language that transpiles to C". Moreover, reports are that the GC performs poorly, and it's not really comparable to Julia because it's not optimized for number crunching and all that. Like I mentioned above, the language doesn't seem to have a good idea of what it's for. It's probably better than Python, but it doesn't take much to be a better language than Python.
↑ · 2017-10-08 09:55
>>4175 Like them, I don't care for Nim and, unlike you, I don't see issue with their critique, although they don't go into much detail. I dislike LLVM for many reasons and this piggybacking to "make" your own language is an aspect of that. Outside of special considerations, such as TeX or variations of Forth, a language that only provides a single implementation is probably very bad. Not only is a great deal of things decided in some way or another to suit this single implementation, but it tends to produce a language that is boring, to write the best. Nim cites compiling to C as an advantage, but what does it actually do that's at all innovative? From what I've seen, Nim is an ALGOL-like, which marks it as roughly the same language as C, C++, Java, Javascript, Python, Rust, Go, Julia, et al., but with some trinket feature and some inclination towards some niche, probably. When a language is designed without first considering how it maps to some other features and is also implemented with regards to this, it produces an interesting language. Take APL as an example of an interesting language. Why should anyone learn Nim instead of APL, when APL will actually expand their thinking and Nim will probably do nothing or even shrink it?
Zero Cool · 2017-10-08 10:16
what
Batou · 2017-10-08 21:24
>>4182 seconding this critique. Seems to not really have a purpose or a reason to use it over other static languages.
Agent Richard Gill · 2017-11-06 04:26
>>4183 https://hookrace.net/blog/what-is-special-about-nim/