[Ohrrpgce] [ohrrpgce/ohrrpgce] Way to skip arguments in HamsterSpeak by passing their default value (#1158)

Ralph Versteegen notifications at github.com
Tue Aug 25 05:01:56 PDT 2020


Keyword (named) arguments in HS (#1156) would provide one way to skip over arguments, leaving them at their default value. An alternative would be a syntax to pass the default value of an argument. These two methods address many of the same cases, but also each are better for certain use cases.

Possible syntaxes:
```
something (3, ?, ?, 4)
something (3, *, *, 4)
something (3, default, default, 4)
something (3, =def, =def, 4)
# The syntax used by FreeBASIC. A bit hard to read, and possibly dangerous,
# since previously HSpeak versions allowed spurious commas
something (3, , , 4)
```

When it comes to translating HS to languages like Lua or Squirrel the same problem and solution as in #1156 applies.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/ohrrpgce/ohrrpgce/issues/1158
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20200825/9bc5a43f/attachment.html>


More information about the Ohrrpgce mailing list