Skip to content
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

[SR-1246] Inconsistent naming and declaration of String & NSString derivative properties and functions #4159

Open
groue opened this issue Apr 15, 2016 · 3 comments

Comments

@groue
Copy link

groue commented Apr 15, 2016

Previous ID SR-1246
Radar None
Original Reporter @groue
Type Bug
Environment

swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a.xctoolchain

Additional Detail from JIRA
Votes 0
Component/s Foundation, Standard Library
Labels Bug
Assignee None
Priority Medium

md5: 1453e0d6656d71f2d9f021adea95860f

Issue Description:

Hello,

In the latest swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a.xctoolchain (master), there are inconsistencies in the following declarations:

extension String {
    public func lowercased() -> String
    public func uppercased() -> String
}

extension NSString {
    public var uppercased: String { get }
    public var lowercased: String { get }
    public var capitalized: String { get }
    public var localizedUppercase: String { get }
    public var localizedLowercase: String { get }
    public var localizedCapitalized: String { get }
}

We see that we have sometimes properties, sometimes functions, and they sometimes end in -ed, and sometimes not.

@pushkarnk
Copy link
Collaborator

I think this question would be answered better on the mailing lists. You could post the same question to swift-corelibs-dev and may be to swift-evolution as well.

https://lists.swift.org/mailman/listinfo

@mattneub
Copy link

I regard this as a Swift bug and I think it's appropriately reported here. I was about to report it myself. uppercased() (method) vs. capitalized (property) makes no sense at all. But that is how this comes across with a Swift string.

@Dante-Broggi
Copy link

What should happen to this report?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants