Giter VIP home page Giter VIP logo

Comments (7)

lukewagner avatar lukewagner commented on August 18, 2024

I think this addition to the spec (as well as the expr/stmt unification) was "aspirational" in nature :) There is an ongoing design/ discussion to add multiple-return values. The result of that discussion would then be reflected here. We should keep this issue open to record this pending work item. Thanks for filing!

from spec.

jfbastien avatar jfbastien commented on August 18, 2024

Could we either make multiple return values an off-by-default feature for now, or add them to the design? I want to make sure we can connect all the pieces together as we get closer to being able to emit code from other languages, so following the design by default becomes pretty important.

from spec.

titzer avatar titzer commented on August 18, 2024

+1 I think we need to achieve consensus on how to handle them, and post-MVP
is probably the right time frame for that.

We shouldn't let the spec get too far ahead of the design :-)

On Thu, Sep 3, 2015 at 5:57 PM, JF Bastien [email protected] wrote:

Could we either make multiple return values an off-by-default feature for
now, or add them to the design? I want to make sure we can connect all the
pieces together as we get closer to being able to emit code from other
languages, so following the design by default becomes pretty important.


Reply to this email directly or view it on GitHub
#15 (comment).

from spec.

lukewagner avatar lukewagner commented on August 18, 2024

I'm happy to bump "Multiple Return Values" from the MVP; clearly the product has been viable so far :)

This is separate, however, from the question of how to define expression types in the spec. As @sunfishcode pointed out for signatures, lists give a nice way to express void (empty list). However, unlike signatures, if we do end up going the route of StrawMan 1 or 2, we'll never have lists of size >1 for expressions, so it'd be better to just have a void type for expressions. None of this is semantically visible (only whether validation succeeds or not), so doing void initially shouldn't prevent a spec refactoring later on if we want real tuple types.

from spec.

rossberg avatar rossberg commented on August 18, 2024

I wouldn't introduce void. Instead, isomorphically, just demote expression types from list(value type) to option(value type).

from spec.

lukewagner avatar lukewagner commented on August 18, 2024

sgtm

from spec.

lukewagner avatar lukewagner commented on August 18, 2024

Fixed by #53.

from spec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.