You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was thinking that perhaps a nice syntax for function definitions would be to follow the steps of TS regarding syntax? Something where all function definitions are just lambdas? The rest of the signature stays the same.
This might look like contriving the syntax, but would actually make adoption easier for newcomers from the language
The example would look like
// v --- This equal sign is added, and this --- vletf=(xs: List<Int>,p: (Int)=>Bool): List<a>=>effect{letx=awaitxsguard(p(x))x.add(1).pure}
The text was updated successfully, but these errors were encountered:
I think that syntax is already supported (or maybe without a result type?).
Definitely, if TS encourages that syntax, hinc should support it, thanks
for the pointer!
I would prefer to keep both syntaxes, though, to cater also for people
coming from Java and similar languages.
El El lun, 10 ago 2020 a las 12:12, Nick Tchayka <notifications@github.com>
escribió:
I was thinking that perhaps a nice syntax for function definitions would
be to follow the steps of TS regarding syntax? Something where all function
definitions are just lambdas? The rest of the signature stays the same.
This might look like contriving the syntax, but would actually make
adoption easier for newcomers from the language
The example would look like
// v --- This equal sign is added, and this --- vlet f = (xs: List<Int>, p: (Int) => Bool): List<a> =>
effect {
let x = await xs
guard(p(x))
x.add(1).pure
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACLQVXVMSFU2LXPVMYUL5TR77BZ7ANCNFSM4PZZULGA>
.
For Java people we could implement function syntax, which would be desugared. I think that becoming something like a TS superset would benefit the project
I was thinking that perhaps a nice syntax for function definitions would be to follow the steps of TS regarding syntax? Something where all function definitions are just lambdas? The rest of the signature stays the same.
This might look like contriving the syntax, but would actually make adoption easier for newcomers from the language
The example would look like
The text was updated successfully, but these errors were encountered: