3 ms·
I don't feel like I've learned much about Go from this article. make(chan bool, 1) what is that 1 for? Why is it not using constructor sytnax shown earlie
by pornel 13y ago
I don't feel like I've learned much about Go from this article.
make(chan bool, 1)
what is that 1 for? Why is it not using constructor sytnax shown earlier? (`Chan{bool}` or `BoolChan{1}`?)
`go function` is nice, but in ObjC there's `dispatch_async()` and `NSOperationQueue`. Go does some magic with green threads, segmented stacks and whatnot, but the article doesn't elaborate.
And for an Objective-C developer Go's lack of proper interoperability with Cocoa is disappointing:
http://stackoverflow.com/questions/6322194/cocoa-bindings-for-the-go-language http://stackoverflow.com/questions/6322194/cocoa-bindings-fo...
BTW:
(CGRect){0, 0, 320, 480}
is valid in ObjC (doesn't apply to classes though).
- mergesort 13y agoAs for (CGRect){0, 0, 320, 480}, it is indeed valid, but it's a lot nicer to have a consistent syntax instead of mixing C with Objective-C.