[Mono-osx] MonoMac naming conventions
Miguel de Icaza
miguel at novell.com
Tue Apr 20 09:52:24 EDT 2010
> I'd like to suggest keeping to the naming convention of the obj-c classes.
> For example the MonoMac binding for NSArray.objectAtIndex has been changed
> to ValueAt. The main reason not to change the names is for documentation.
> I can look up what NSArray objectAtIndex does on the web very easily. But I
> have to perform a translation of ValueAt to get to objectAtIndex. Yes this
> example is trivial but the argument holds up as more of the core libraries
> are bound.
>
That is a core design decision of these bindings. If you want the approach
you describe there are other Cocoa bindings that you can use that offer that
possibility.
For MonoMac, you will have two options:
* The translated docs that we produce.
* The "Rosetta stone" approach:
http://tirania.org/tmp/rosetta.html
Our naming is designed to match the Framework Design Guidelines naming
conventions.
Ideally I could take obj-c code and do a line by line translation. There
> may be better ways to write the code in C# MonoMac but the rewrite should
> not require function name changes.
>
That is not what MonoMac is designed to do.
Another example is: NSURLConnection. This was changed to NSUrlConnection.
>
That is done per the Framework Design Guidelines.
For a quick easy-to-read rationale read:
http://brad_abrams.members.winisp.net/Projects/PDC2008/FrameworkDesignGuidelines.ppt
Or on the web:
http://www.slideshare.net/brada/framework-design-guidelines-presentation/
Miguel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20100420/b37b3f14/attachment.html
More information about the Mono-osx
mailing list