We have hundreds of these calls, maybe shorten them up?
Details
Diff Detail
- Repository
- rPHU libphutil
- Branch
- phutil_tag
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 9396 Build 11178: Run Core Tests Build 11177: arc lint + arc unit
Event Timeline
What do you think about, say, new PHUIStrongView($content) instead? I don't really like these (or phutil_tag_div()) very much, especially since these take different parameters than phutil_tag_div() does. I worry about a future world where we have like 10 of these and they all behave very slightly differently and the benefit is that we saved like 800 bytes of code in the whole codebase.
That is, if you know what phutil_tag() does, it's totally obvious what phutil_tag('em', array(), $content) does, even if it's a little redundant. Then let's say you learn phutil_tag_em($content), and it's okay because it's very slightly shorter. Then you're like "oh I can shorten div too" so you write phutil_tag_div($content), which breaks because the first parameter to phutil_tag_div() is not $content but $class.
I don't feel too strongly about this, though. See also D7545#48975.