I'm using the @Parcelize
feature in android development using Kotlin language.
To use them I have done the below modifications in build.gradle file.
apply plugin: 'kotlin-android-extensions'
then
androidExtensions {
experimental = true
}
I'm successful in using the above feature. But is it recommended to use them for production release or only for development purpose alone?
This isn't just an Android-thing though, it's Kotlin in general. Kotlin has quite a few experimental features, such as coroutines and the android extensions.
If you read the docs, you'll find this:
Experimental features simply mean a different compatibility system. They still work (beta builds fall under EAP, and EAP has no guarantees for compatibility or stability). Experimental features are technically releases, which means they're as stable as any other language feature (as in there can be bugs, which there always can be, but it's intended to be stable).
So if you want to use it in production, do it. The experimental features have different compatibility modes, but they should be as stable as any other language feature. They're "safe" to use in production without much problem. You might have to re-write code if there's an incompatible update, but that's a development problem and not a release problem.
However, the android extensions docs also has a mention of the experimental part:
Considering the things I mentioned earlier, this probably means the feature itself isn't finished, equivalently to the coroutines. You can use it in your production releases, but it's not considered a production-ready component of the Kotlin language. And since it's experimental, it has been released. Releases are usually better than EAP versions.
See also this forum post on the Kotlin forums (it mentions coroutines, but some of it applies to other experimental features as well).
And, obviously, if it doesn't work in development, it's most likely not going to work in production either. If something in the extension is completely broken, don't use that specific feature. It doesn't necessarily mean the entire extension is broken though. Generally, even with EAP, if it works, you can use it in production.