As far as the new crop of languages go, I think Rust and Go both offer better refinements of older languages than Nim does. If you're going to come out with a new language, the syntax of it should be cleaner and easier to read than what you are replacing (in this case, seemingly C/C++/Java) or there's not much point.
But ultimately this is personal preference, which is why I worded my comment that way. Instead of people simply disagreeing they have so far down voted me to -3 and counting. HN is overrun with a groupthink mob lately. I have tested this on a number of occasions posting comments that I knew were pandering to the mob, and today posting one I thought probably would go against the grain and the results are totally predictable. It's very sad.
I revised the one you responded to so you may want to check that now.
As far as more details of what I don't like about Nim, that would have been easy to ask directly; I find the syntax of:
echo("Hello world!")
To be outdated and ugly. I also find the case statement to be awful to read the way they've done it, I far prefer the set of cases to be indented from the case statement itself. And the "of" on each line is redundant cruft.
This is a brand new language and it holds on to what to my eyes is the worst cruft of old languages.
> echo("Hello world!")
Would you prefer System.out.println("Hello world!"); instead?
> I far prefer the set of cases to be indented from the case statement itself.
You can in fact do that, it is however optional.
> And the "in" on each line is redundant cruft.
Not sure what you mean here. "in" is only used in for loops.
This is why I didn't get into details originally because I knew I would get this kind of response.
You know full well that's exactly the opposite of what I mean. You're being an asshole for no reason.
> Not sure what you mean here. "in" is only used in for loops.
I meant the "of"s, of course.
I apologise if I came out sounding like an asshole, but I honestly am not sure what syntax you would prefer. Any chance you could show me?
Would you rather puts instead of echo?
I'm struggling to think how different it could be.
Remove the parens? print instead of echo? It's a fairly minor point. I'm fairly very sensitive on issues of visual clutter in syntax and this doesn't bother me in the slightest.
> I far prefer the set of cases to be indented from the case statement itself.
As mentioned elsewhere this is optional but I do agree
> And the "of" on each line is redundant cruft.
I suspect there might be a good reason for needing a keyword here. I would have to dig deeper to be sure though.
Anyway - I can tolerate both of those. Any language with significant white-space and no curly-brackets is off to a good start aesthetically in my books. Skimming through the tutorial shows remarkably few horrors even when doing some moderately advanced stuff e.g. http://nim-lang.org/tut2.html#generics
echo("Hello")
echo "Hello"
"Hello".echo
"Hello".echo()
Or something different? cout << "Hello";
beats all of the above by a wide margin. It's essentially an ASCII-art ideographic representation of what the computer is supposed to do. proc `<<`(f: File, s: string) =
f.write(s)
stdout << "Hello World"
There you go :) echo "Hello"
Is the way ? :)This:
> I find this language pretty ugly. And [...] that's enough reason to not use it.
is the worst possible way of choosing a language to use. It's simply stupid to dismiss languages which may suit your current problem on the grounds of aesthetics. I can't imagine a single situation where "disregarding technical advantages" of a language would be even remotely related to the right thing to do.
And this:
> syntax of it should be cleaner and easier to read than what you are replacing
is another pile of misconceptions: no, designing your syntax by comparison to other languages instead of designing it to fit your semantics is NOT a good idea; there of course IS a point in creating languages even if syntax is not "better" in any way (because semantics matter too) and no, you should NOT try to make your syntax "easy to read" but rather simple and consistent, which will make it easy to read without you even trying. At least "easy to read" to those programmers who are able to work with more than one syntax flavour; the rest will have a hard time reading anything anyway, so there's not much you can do about them.
I made learning all the languages I can a hobby of mine quite a few years ago and I since learned many very, very different syntaxes: look at Prolog, Forth, Scheme and J for the most basic examples. And what I learned is that they all work and work well, despite not being "clean and easy to read" for people who don't know them. It's normal; what's wrong however is trying to make your ignorance into some kind of generally applicable law and judging languages based on it instead of first learning a bit about them.
Now, I'm sorry for being rude, and a little ranty, but I found your suggestion that I'm a part of "groupthink mob" rather offensive.
> Maybe it's just me but I find this language pretty clean and nice looking. And regardless of its technical disadvantages it may have, that's enough reason to use it. There are too few languages out there, and we really need more like Nim.
... I still would have down-voted you.
It's a content free comment that doesn't constructively contribute anything. It's the kind of comment I'd expect to be top-voted in an /r/programming thread.