Recent submissions

Comment · 8 years ago
Social platform.
Comment · 8 years ago
Go is not really 'pass by value' when passing slices. It just passes the pointer value instead of doing a deep copy(copying the backing array). When trying to grow a slice in a function, the result is unpredicted because of 'apend' implicitly choosing to allocate memory or not. In addition, it is not concurrent-safe to pass mutable data. To avoid the safety problem, you have to copy stuff and consequently suffer a performance penalty. A better way to solve the problem is to introduce immutibilty. If one day immutibilty is introduced in Go 2(or 3), i wish slices are really passed by value. Then everything is passed by value as default with the immutable data passed by reference. You can still use pointers to pass mutable data just like using '_' to explicitly ignore error handling.

Now in WAT 1,

    func grow(s []int) { // s is deep copied.
        s = append(s, 4, 5, 6)  // changing 's' does not effect original slice.
    }
Explicitly pass mutable slice,

    func grow(s *[]int) { // s is referenced.
        *s = append(*s, 4, 5, 6)  // changing 's' will always effect origin slice.
    }
Explicit is better than implicit.
Comment · 8 years ago
You are allowed to install other app stores on a android device.You can even install apps from unknown sources.But you need to be responsible for your own security.
Comment · 8 years ago
Google: ARCore MLkit Apple: ARKit CoreML
Comment · 8 years ago
Not the OP,maybe Bill Joy and John Carmack.
Comment · 8 years ago
But its users want.
Comment · 8 years ago
Flutter has the potential once it ported to desktop and even web(with WASM).
Comment · 9 years ago
But it's not compulsory on android.
Comment · 9 years ago
What a misleading title.Beijing Sinnet is just a shell company of amazon china(The same as Guxiang which is a shell company of google in china).
Comment · 9 years ago
Why should google's products must work with Amazon's products?It's not Amazon who sell google's products but google sell its own products via amazon online shopping platform.Does amazon echo have to work with google's product or install google's software or services to appear in search results?
Comment · 9 years ago
Comment · 9 years ago
Absolutely agree with you.In china more and more people know the internet through wechat and do almost everything on wechat.
Comment · 9 years ago
Except china.
Comment · 9 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton