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.
}
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.
I am not aware that anyone has ever made this work. Full VMs are escapable, iOS jails have been broken and even permissions technically allowed can be abused, etc. There is room to improve, but "just make it impossible to escape the sandbox" is massively oversimplifying. It also makes it harder to make useful apps if you reduce API surface.
However, you can't install other app stores from the Play Store itself. That seems pretty anti-competitive. Google also bans ad-blockers from its Play Store. Why? Because they interfere with its business model. Again, anti-competitive. No different than Verizon banning Skype from its network.
It's a shame the EC didn't hit Google over these, too.
It's kinda a chain of trust. One of the value of the Play Store is that you trust it not to include malware (if you do). If they allowed other app stores to be installed through it, google can't be confident in saying if you use our store, you won't get malware.
Based on total malware installs, where Apple has everybody beat by even just Xcodeghost alone.
Google doesn't pretend that manually reviewing apps prevents malware because it obviously (to any software engineer) doesn't. It does, however do both static and dynamic analysis of the apps in its store, unlike Apple and the Chinese app stores.
There is no "Chinese app store" for iDevices. Anybody who downloaded WeChat anywhere in the world was affected.
Trying to bring uo unpatched devices is changing the subject (security-conscious people use Android devices that get regular security updates) — we were talking about app stores. It remains a fact that far more people have been infected with malware from the Apple App Store than from all other app stores combined.
People who care about security use devices that get updates - that’s true. They buy iOS devices.
Which Android devices get regular updates for over 2 years? 3 years? 5 years?
Android is insecure by design - since most devices can’t be updated. Unlike iOS devices that get updated regularly worldwide without waiting on the carrier.
And I posted links showing that Android is not as secure. Do you have any links to back up your claims?
That doesn't sound anticompetitive in the least. Alternative stores are allowed on Android; Google just isn't going to bend over backwards to do everything for you.
Apple seems to use both, but they've been leaning towards Core* rather than *Core recently. We have CoreAudio, CoreBluetooth, CoreFoundation, CoreGraphics, CoreImage, CoreLocation, CoreText…but there's also WebCore, JavaScriptCore, QuartzCore, and ImageCaptureCore.
I think it'll only be ported to desktop once Fuchsia comes closer to release (which could be several years). They really seem focused on mobile only at the moment. Agree it could be a great solution.
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?