TelluIoT / ThingML

The ThingML modelling language
https://github.com/TelluIoT/ThingML
Apache License 2.0
101 stars 32 forks source link

Multiple return-values from functions #229

Open jakhog opened 6 years ago

jakhog commented 6 years ago

This is mostly sugar, but is one of the parts I like a lot about languages like Go and Python, and it would not take a lot of work to support it for all target languages.

It is also closely related to "composite types" which have been discussed in #160. If we make those first, multiple return values could automatically be wrapped in composite types and returned from multi-return functions.

brice-morin commented 6 years ago

Well, if we go for composite types, I would not do anything automatically but rather allow function to return composite types explicitly. But we of course need constructors and accessors for thos composite types.