Social platform.
HN user
hooluupog
none
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.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.
Google: ARCore MLkit Apple: ARKit CoreML
Not the OP,maybe Bill Joy and John Carmack.
But its users want.
Flutter has the potential once it ported to desktop and even web(with WASM).
But it's not compulsory on android.
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).
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?
Absolutely agree with you.In china more and more people know the internet through wechat and do almost everything on wechat.
Except china.
According to what Fuchsia developer Travis Geiselbrecht said in the public Fuchsia IRC channel,the OS “isn’t a toy thing, it’s not a 20% project, it’s not a dumping ground of a dead thing that we don’t care about anymore.”[0]
[0]https://arstechnica.com/gadgets/2017/05/googles-fuchsia-smar...
and Photos
On the contrary,China proves what's so bad without the Play Store and GCM.Android is a mess there.
Actually,erlang is being used in taobao.