Israel:

I think the languages out there with the cleanest looking syntax
is C# and similarly Java.

Haskell and Python have a much cleaner syntax compared to C#/Java. But sometimes in Haskell you don't have enough anchor points to quickly understand what the code means. So I think the modern F# syntax is a good compromise.


In C# i would use something like:

int ThisNumber;
ThisNumber = Console.ReadLine();

in D it looks worse with its "old" way of doing it:

int thisNumber
readf("%s", &thisNumber);

Do you want to use a "%d"?

A more common way to do it in D is something like:

auto inLines = readln.byLine;
immutable thisNumber = inLines.front.to!int;
inLines.popFront;


The point is, I agree. Syntax like this is so terrible to look at it hurts. I feel like i lose 10 minutes of my lifespan every time i look at this.

It's also a lot a matter of getting used to it.

Bye,
bearophile

Reply via email to