Yeah, I had to make due with the docs available on my machine. I only started this cause my in-flight internet went offline. The ability to make your own operators is pretty damn cool, and pretty damn scary as well. I have a feeling that in the coming months, many libraries will abuse the shit out of this feature.
Not exactly from what I understand, but the operator definition is just telling swift that '<-' is a usable prefix and infix. To actually use them on an object you need to have class/struct specific implementations of the function.
It's both amazing and horrifying the level of overloads that Swift supports. If the early cases are done well we may avoid the C++ mantra of overloading==evil.
I'm a little confused - when you say "should write value to pipe or block until it can"[1] - I don't see how this will block, it looks like it will just return if the pipe is full. I confess to be only a little bit familiar with GCD!
derp. yeah i wrote the comments before i coded it. I'll probably revise this section at some point. I still want to figure out if implementing select{} is possible
11 comments
[ 3.2 ms ] story [ 31.3 ms ] threadI love it.
[1] https://github.com/billylindeman/swiftgo/blob/master/swiftgo...