← Back to context

Comment by maxloh

15 days ago

Here's a beginner tutorial for the language: https://docs.toit.io/language/toitversus

Nice syntax. It looks like how we'd design programming if C had never existed.

  add a/int b/int -> int:
    return a + b
  
  main:
    print (add 2 3)  // Prints 5.

There are systems programming languages since JOVIAL in 1958, enough of them to chose from if C had never existed, and what syntaxes would be favoured instead.

  • It's an interesting thought experiment, but honestly for all its flaws, C did have one large advantage regarding syntax: braces. Even if C had never been invented, at some point people would have noticed that Fortran/Pascal/Whatever style BEGIN ... END blocks are annoying and just a waste of tokens.

    • Nah, the advantage was called UNIX, with source code being available for a symbolic price with a C compiler, at least until AT&T got allowed to charge for it, a decade later.

      You mean the same people that now write piles of Markdown tokens in plain English?