Remix.run Logo
▲ heavensteeth 3 hours ago

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.
▲kasperl 3 hours ago | parent [-]

Arguments like --greeting are the named arguments:

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

The name argument is positional here.

▲IanCal 2 hours ago | parent [-]

Feedback for the doc writers on this then, the phrase in my head of "the name of the named argument is greeting, name is not named" is a little awkward.

▲kasperl 2 minutes ago | parent [-]

:)