Code Monkey home page Code Monkey logo

Comments (4)

onevcat avatar onevcat commented on August 26, 2024

No, the external name is a part of method name, and the local parameter should be used. You can see the quick help of Apple's API to confirm it, they are using the local name.

snip20141012_2

from vvdocumenter-xcode.

vjosullivan avatar vjosullivan commented on August 26, 2024

Interesting. I can see that you would want to copy the way Apple does things but I can't see why the external documentation of a method would refer to an internal parameter name rather than the external parameter name, given that it is the external name that the user of the method would see. The person calling the method isn't (or shouldn't be) concerned with how the variable is named inside the method.

from vvdocumenter-xcode.

vjosullivan avatar vjosullivan commented on August 26, 2024

It looks like Apple are inconsistent in this matter...
image

from vvdocumenter-xcode.

onevcat avatar onevcat commented on August 26, 2024

As I said, an external param name will be used as the method name. It IS a part of your method name in fact, instead of the param name. The navigation bar is showing the method name while the quick help will show the internal name.

Think about what to show if a func is defined with a _:

func hello(_ firstName: String, _ lastName: String)

There must be something to refer as the documentation, and the method name would be ok as hello(_:. _:)

from vvdocumenter-xcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.