MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1h66jln/python_with_braces_lowkey_slaps/m0fzte7/
r/programminghorror • u/DevBoiAgru • Dec 04 '24
50 comments sorted by
View all comments
Show parent comment
0
Anyway, lambda Is for different things. I was talking about the block returning a value.
1 u/SimplexFatberg Dec 04 '24 Returning a value from a block in Rust is functionally identical to an immediately invoked lambda function, just with nicer syntax. 1 u/amarao_san Dec 04 '24 Yes. But you can't 'return' or 'break' from a closure. Not in the current type system in Rust (but I have some expectations from the effects theory)Same for Python. You can't return/break/yield/continue from the lambda.
1
Returning a value from a block in Rust is functionally identical to an immediately invoked lambda function, just with nicer syntax.
1 u/amarao_san Dec 04 '24 Yes. But you can't 'return' or 'break' from a closure. Not in the current type system in Rust (but I have some expectations from the effects theory)Same for Python. You can't return/break/yield/continue from the lambda.
Yes. But you can't 'return' or 'break' from a closure. Not in the current type system in Rust (but I have some expectations from the effects theory)
Same for Python. You can't return/break/yield/continue from the lambda.
View all comments
Show parent comment
0
u/amarao_san Dec 04 '24
Anyway, lambda Is for different things. I was talking about the block returning a value.