vasilvv at gmail
Jun 9, 2012, 10:00 AM
Post #4 of 4
On Mon, Jun 4, 2012 at 12:30 PM, Ori Livneh <ori.livneh [at] gmail> wrote:
> I find getSomething syntax to be cluttered and verbose. The "get", the
> mixed case, the function invocation -- these things are not encoding useful
> information, so they exist as a kind of syntactic line noise. I find it
> much easier to orient myself around APIs that make use of property
> accessors -- obj.foo rather than obj.getFoo().
Done. I've updated spec with properties
> My second quibble is with the mw.title interface. Most of the other
> interfaces follow a loose convention of mw.object.getPropertyOfObject(),
> but mw.title.parse(text) seems to get things backwards -- it's
> mw.property.getFromObject(), if you will. I find that a bit confusing.
I'm not sure I quite get this one.
> In general, I'd prefer it if there was a sharper distinction between the
> REST-like resources-with-methods semantics (mw.page, mw.site) and the
> "standard library" approach whereby things are bundled according to
> functionality (mw.time, mw.url).
Well, they are all bundled according the functionality (get current
page info, get site info, i18n functions, etc.).
> Hope this is useful. I think it's a cool project.
Wikitech-l mailing list
Wikitech-l [at] lists