-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] Keep Native Platform API with the same name convention as it is in Native Platform #522
Comments
The bindings to the native platform are maintained in https://github.com/xamarin/xamarin-android and https://github.com/xamarin/xamarin-macios for Android and iOS respectively, and so those repose would be the better places to bring this up. However, I doubt you will get much support as the advantages seem minimal. You say that you have to rename the whole API when copying platform examples - in my experience much more has to change when copying native Android code and just changing case is a small part. This will only increase as more is written in Kotlin. |
@GalaxiaGuy I agree that it is maintained by separate projects, but only guys that develop MAUI can decide to request this feature for next major framework as MAUI otherwise guys in that project will just reject this request And regarding the Kotlin, Android documentation provides examples for both Java and Kotlin languages ;) |
This would be a breaking change for all existing Xamarin.Android and Xamarin.iOS code, and cause a similar problem for anyone porting existing Xamarin.Forms code to MAUI. Plus those names would violate the C# and .NET naming conventions; since MAUI is part of .NET, we need to remain consistent with those naming conventions. That said, there may be some demand for a Visual Studio extension which can automatically convert pasted Java examples into C# by fixing names and casing. Maybe someone in the community can take a stab at that. |
Oh ... Some of Microsoft guys think differently as I mentioned in dotnet/machinelearning#5918 Also I do not ask to break existing code, I ask to generate method with two names ... |
Summary
I have lots of experience in Xamarin.Forms and Xamarin in general and one of the issues in this framework is that when I copy platform example to .NET project it is not working without renaming the whole API !!
API Changes
I think it would be helpful to have the same API name conversion as in Native Platform or at least to provide the same API in two variants:
As all Native Platform API Bindings generated by external tool, it means that we could generate two functions instead of one:
There are lots of frameworks that support Native Platform API as it is: NativeScript, Tensorflow.NET, and it seems very useful
Intended Use Case
Intended to be easier to learn platform API
The text was updated successfully, but these errors were encountered: