Go blocks or general blocks #11692
Replies: 6 comments
-
good Idea.
|
Beta Was this translation helpful? Give feedback.
-
are you going to have to define the type of the value you're working with in an anonymous function? |
Beta Was this translation helpful? Give feedback.
-
go routines in V are patterned after go routines in Go. Syntax that is well-known and has been working for years. It's really not that bad to "have to" declare a function. Especially if you might want to use it multiple times, instead of having to make multiple copies of your "go block", or an anonymous function, or whatever. |
Beta Was this translation helpful? Give feedback.
-
There's no reason not to support an anonymous function. |
Beta Was this translation helpful? Give feedback.
-
@JalonSolov I didn't want to say that using a function if you call it multiple times is bad. |
Beta Was this translation helpful? Give feedback.
-
Yeah that makes sense. That's exactly why we have This will most likely be implemented. |
Beta Was this translation helpful? Give feedback.
-
Reason
AFAIK, if you want to run code on a seperate thread, you have to put this code into a function.
I think it would improve things if there were "go blocks" like this:
because then you wouldn't have to create a function for every thread you have.
Beta Was this translation helpful? Give feedback.
All reactions