xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.43k stars 507 forks source link

NSFont.FromDescription should be named NSFont.FromDescriptor #19461

Open tipa opened 9 months ago

tipa commented 9 months ago

I believe these bindings are wrongly named and should be called NSFont.FromDescriptor

https://github.com/xamarin/xamarin-macios/blob/dd3aa9afcae832a5da2e706d2ac5bed4689cb04c/src/AppKit/NSFont.cs#L70-L80

https://developer.apple.com/documentation/appkit/nsfont/1525386-init https://developer.apple.com/documentation/appkit/nsfont/1525775-init

rolfbjarne commented 9 months ago

These bindings are quite old now :) That said, you're right, we can certainly name these better.

We'd probably go for something that follows our Design Guidelines - method names should contain a verb - so we might go with something like just Create or Get instead.