function support in ftd #336
amitu
started this conversation in
Ideas & RFCs
Replies: 1 comment
-
|
We will be more like In rvalue we either expect Let's not have If expression does not give a value, it returns null. Will not compile because Or even
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Main discussion: #434
We want people to be able define functions in FTD.
YouTube discussion about this topic:
Event Handler Functions
Side effect functions are function that mutate some value. They can not directly mutate a global, they have to be explicitly passed the mutable reference to a variable so they can mutate that variable. Side effect functions have type
event-handler.event-handlerfunctions can only be used as event handlers.Pure/Expression Functions
Then we have normal functions, they do not mutate anything, but return a value:
Such function are pure and can only be used as expression, eg:
Trying end syntax
Attempt 2
Using Functions In FTD
Why Are We Even Considering This Weird Syntax
Dependency Graph And Page Updates
Is a DAG (directed acyclic graph).
y -> [(i.text, "fn1"), (i.size, "fn2")]Beta Was this translation helpful? Give feedback.
All reactions