Hacker News new | past | comments | ask | show | jobs | submit

Toit v2.0.0

https://toit.io/blog/toit-v2-0-0/
loading story #50349368
loading story #50349289
loading story #50353549
loading story #50349241
This seems very interesting. It almost looks/feels like Pythonic Go.

There's already another syntax example in the thread, but I want to point out the weirdest syntax I've seen yet: positional arguments look like posix command arguments:

   greet name/string="World" --greeting/string="Hello" -> string:
     return "$greeting $name"

   main:
     print (greet)                         // Prints Hello World.
     print (greet "Ada" --greeting="Hi")    // Prints Hi Ada.
Arguments like --greeting are the named arguments:

https://docs.toit.io/language/beginner/lists-and-functions/#...

The name argument is positional here.

loading story #50349259
loading story #50352741
loading story #50351429
loading story #50351597
loading story #50350880
loading story #50349641
loading story #50349679
loading story #50349391
loading story #50351407
loading story #50349711
loading story #50350266