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

var rx_tap instead of func rx_tap #27

Closed
danielt1263 opened this issue May 29, 2015 · 6 comments
Closed

var rx_tap instead of func rx_tap #27

danielt1263 opened this issue May 29, 2015 · 6 comments

Comments

@danielt1263
Copy link
Collaborator

Currently the library uses code like:
public func rx_text() -> Observable<String> { ... }

What would it take to convince you to use something like the below instead?
public var rx_text: Observable<String> { ... }

@kzaher
Copy link
Member

kzaher commented May 29, 2015

I've actually tried using properties in extensions initially, but for some reason compiler was complaining :(, so I've said, what the hell, I'll just use functions.

It looks like compiler isn't complaining in swift 1.2 and Xcode 6.3.2, so we can use properties wherever possible :)

@danielt1263
Copy link
Collaborator Author

I'm willing to make this change if you want... but it's a breaking change. Let me know what you want to do.

@kzaher
Copy link
Member

kzaher commented May 30, 2015

Ideally, I would always want to be backwards compatible, and will try to be.

If there are some obvious mistakes in the API or ugly interface that could be easily improved, I would like to correct it as soon as possible (before there are tons of code that depend on it).

I don't expect these changes will aggravate users, because they will make their code more clear, and they would just need to remove redundant ().

If you want to help the project, go for it 👍 and make those changes.

@bontoJR
Copy link
Contributor

bontoJR commented May 30, 2015

I have a consideration about this: we are in the early times of the project, breaking changes are always bad, but are tolerated in early stages. I would prefer to have a breaking change now, rather than in a year or so while using the framework in an app in production.

@kzaher kzaher closed this as completed Jun 10, 2015
@nathankot
Copy link

Hey guys, I just started using this library and it looks like rx_text etc.. has already been swapped over to being properties? In that case the readme is a little confusing because it still shows it as a method

@kzaher
Copy link
Member

kzaher commented Jun 20, 2015

Hi,

sorry, readme probably has stale information.

@debolee debolee mentioned this issue Jan 6, 2025
17 tasks
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