Re:I Believe Zig Has Function Colors
by Dylan16807 on Saturday April 09, 2022 @05:59AM
(#30966611)
> To me, this is akin to the pure/unpure function classification in FP, it makes sense that calling an unpure function would also "taint" the caller.
Well it also sucks if unpure code has to add a bunch of boilerplate annotations to every single function and call.
> I recently tried Go to speed up some Cloud Functions that use Firestore, it's very difficult to know which of the chained method calls of the Google-provided SDK is the one to actually "blocking" the green thread, perhaps they are all are unnecessarily?
If you have to mark enough of your functions as "possibly blocking" then you can get just as lost about which one is actually blocking in a particular situation.
Well it also sucks if unpure code has to add a bunch of boilerplate annotations to every single function and call.
> I recently tried Go to speed up some Cloud Functions that use Firestore, it's very difficult to know which of the chained method calls of the Google-provided SDK is the one to actually "blocking" the green thread, perhaps they are all are unnecessarily?
If you have to mark enough of your functions as "possibly blocking" then you can get just as lost about which one is actually blocking in a particular situation.