Comment by throwA29B

5 hours ago

No. You want 'for' to be a looping construct with no other meanings.

Seeing code in my native language makes me laugh, I can't take it seriously.

I strongly disagree. Take, for example...

  foreach (apple in fruitbasket)
    apple.Eat()

vs.

  for (int i = 0; while i < fruitbasket.Count; i++)
    fruitbasket[i].Eat();

Even as a low-level programmer, I truly loathe C-style for loops. It takes several seconds to parse them, while the C#-style foreach is instantly grokkable with zero mental overhead. When you're scanning over thousands of lines of codes, the speed and ease of reading constructs like these adds up and makes a huge difference. The desire to apply human-friendly syntax to low-level programming is among the greatest motivating factors for the language I'm working on. All of that being said, I think there is a huge advantage in having code that reads like natural language you understand, rather than having keywords that are foreign and meaningless to you.

  • Coming soon to a programming ecosystem near you:

    LLM(eat apples in fruitbasket)

    vs

    foreach (apple in fruitbasket) apple.Eat()

    Your comment can be repeated almost word for word here.

    • Not at all. I'm describing two different syntaxes that can compile to the same machine code. A syntax that produces non-deterministic results is a completely different matter.