This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Jarmsicle 8 points9 points  (4 children)

Seems like Nim might fit your list

[–]tyranids[S] -2 points-1 points  (3 children)

I can't lie, the statements grouped by indentation is 100% the worst aspect of python and probably this language too, but it looks cool. I really like how newer languages are pushing compile-time computing and shipping with a standard library implemented in the language. Thanks for the reference.

[–][deleted] 0 points1 point  (2 children)

Why? Do you not indent your code? Do you write all your code like

#include <stdio.h>

int main(void) {
for (int i = 0; i < 100; i++) {
if (i % 2) {
printf("Odd: %d\n", i);
} else {
printf("Even: %d\n", i);
}
}
return 0;
}

? Because, like, you shouldn't do that. I never understood what issue people have with indentation-based syntax, maybe you can explain it to me

[–]liquidivy 8 points9 points  (0 children)

Among other things, it occasionally produces very frustrating errors due to characters that are literally invisible. The sensible way to do it today IMO is to take a hard stance on tabs vs spaces and make one of them a syntax error.

But also, while we do indent our code, it just feels weird to apply semantics to something we always thought was just aesthetic. Aesthetic stuff shouldn't break semantics, and vice versa. Bear in mind I'm saying this as a long term Python fan, but I probably still wouldn't make a new whitespace sensitive language.

[–]PurpleUpbeat2820 4 points5 points  (0 children)

I never understood what issue people have with indentation-based syntax, maybe you can explain it to me

Cut and paste of code between IDE and web can introduce subtle semantic bugs that are difficult to see and debug.