Navigation Menu

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

Move Bidi static methods to instance methods on TextDirection #11752

Closed
DartBot opened this issue Jul 9, 2013 · 5 comments
Closed

Move Bidi static methods to instance methods on TextDirection #11752

DartBot opened this issue Jul 9, 2013 · 5 comments
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jul 9, 2013

This issue was originally filed by @seaneagan


In package:intl, Bidi acts as a namespace for static methods, which is generally an anti-pattern in dart, since dart libraries can act as namespaces for static methods, so a separate "bidi.dart" library maybe. However, most of these methods are duplicated for both TextDirections (RTL and LTR), so it seems like making them polymorphic to TextDirection would make sense. For a basic idea of what this would look like, see:

https://gist.github.com/seaneagan/5957736

Of course they wouldn't make sense for TextDirection.UNKNOWN, but I don't think TextDirection.UNKNOWN is necessary. I think it would make more sense just to reuse null for that concept.

Another option would be to keep them as static/top-level methods which receive a TextDirection, but that doesn't feel quite as nice.

@iposva-google
Copy link
Contributor

Added Area-Pkg, Triaged labels.

@sethladd
Copy link
Contributor

cc @alan-knight.
Removed Type-Defect label.
Added Type-Enhancement, Pkg-Intl labels.

@sethladd
Copy link
Contributor

Do we intend to do this? If not, can we close?

@alan-knight
Copy link
Contributor

I'd say close. It's probably a good idea, but I don't think people tend to use those methods explicitly, so it doesn't seem worth the work to re-arrange. We have a lot bigger things that need work.


Added WontFix label.

@DartBot DartBot added Type-Enhancement area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. labels May 19, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/i18n#334.

@kevmoo kevmoo added closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug and removed priority-unassigned labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants