Correct me if i'm wrong but it seems to me that there are Zig, Nim, Dart, Carbon, C3, ooc, (maybe Eiffel?) too in this space, and that only counting C/C++ replacements that you can compile in a way or another.
Correct me if i'm wrong but it seems to me that there are Zig, Nim, Dart, Carbon, C3, ooc, (maybe Eiffel?) too in this space, and that only counting C/C++ replacements that you can compile in a way or another.
HN crowd would not agree with me, but indentation-based syntax is easier to read, less cluttered and more intuitive than multiple nested ()'s or {}'s . And the success of python, despite it's countless flaws is the proof.
I also like the way Nim with its command calls and so on is even more compact and "to the point" than Python is. Whenever I go back to Python from Nim, I think to myself "Why all this clutter?" :-)
I don't understand how is that an issue, unless you write your code in notepad =).
And even if you do use dumb text editor, you can quickly write code with 1-space indentation and reformat it with nph[0].
There's also a neat trick for people who like C-style languages. If you use sufficiently enough parenthesis and semicolons - you don't need indentation at all:
import os;proc main = (let file = paramstr(1);(for line in file.lines:(echo line; if line == "": return)))
Random thought: it shouldn't be too hard to write a formatting tool that translates braces to indentation and vice versa. But I have yet to see a project like this for Nim.Yeah, bliss-style, you know in docs it isn't made clear that that works but i sensed that would.
> Random thought: it shouldn't be too hard to write a formatting tool that translates braces to indentation and vice versa. But I have yet to see a project like this for Nim.
It's a hour-long "project" if you don't care about how to treat pragma annotations. I did just that.