Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed description of function #365

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CoruNethron
Copy link

"a compound type of several arguments and one return" may be misunderstood as "one return statement", but in fact it means "one return value". Also, there might be no return value, i.e. [Any]->Void

"a compound type of several arguments and one return" may be misunderstood as "one return statement", but in fact it means "one return value". Also, there might be no return value, i.e. [Any]->Void
@Simn
Copy link
Member

Simn commented Dec 2, 2018

This leads to the old "is Void a type" discussion. I agree the original isn't 100% accurate, but IMO your change isn't any better (and has weird grammar). I'll leave this open as a reminder but will push a different fix.

@Aurel300
Copy link
Member

Aurel300 commented May 24, 2019

@Simn Any thoughts on this? What about:

a function which expects zero or more arguments of specific types that will return a value when called

I think it's fine to consider Void a value here so we don't complicate the short description.

@player-03
Copy link
Contributor

This leads to the old "is Void a type" discussion.

Whether or not it's a type, I think we can all agree it's a return type. Which suggests a simple change:

  • Function: a compound type of several arguments and one return type

Or for consistency:

  • Function: a compound type of several argument types and one return type

Or if you're fine leaving out the reference to "compound type":

  • Function: a collection of argument types plus one return type

Or to make it clearer that we're talking about the function type and not a function definition:

  • Function: a function signature, consisting of a number of argument types plus a return type

...but that doesn't quite fit the rest of the page. The rest of the page draws less distinction between the type and the value stored in a variable of that type. Perhaps this would fit better:

  • Function: a Haxe function, with known argument types and return type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants