ibm-js / ecma402

ECMA-402 JavaScript Internationalization API "shim"
Other
34 stars 21 forks source link

Clean up main directory #47

Closed JCEmmons closed 10 years ago

JCEmmons commented 10 years ago

Remove clutter from main directory by moving .js files to either impl or calendars directories. Fixes #28

wkeese commented 10 years ago

Seems reasonable to me, except why not put all the calendar modules in the calendar directory?

JCEmmons commented 10 years ago

It's a subtle distinction, I suppose. The calendars directory has just the various supported calendars, not the generalized functions that happen to pertain to calendars.

Regards,

John C. Emmons Globalization Architect & Unicode CLDR TC Chairman IBM Software Group Internet: emmo@us.ibm.com

From: Bill Keese notifications@github.com To: ibm-js/ecma402 ecma402@noreply.github.com, Cc: John Emmons/Austin/IBM@IBMUS Date: 06/18/2014 04:09 PM Subject: Re: [ecma402] Clean up main directory (#47)

Seems reasonable to me, except why not put all the calendar modules in the calendar directory?

— Reply to this email directly or view it on GitHub.

wkeese commented 10 years ago

Right, I understand. Note that arguably all the files should go into the impl/ directory, since they are all part of the implementation. But since you've made a separate directory called calendar, it seems cleaner to me to put everything there. Just a matter of taste I suppose.

wkeese commented 10 years ago

One other thing: Shouldn't either Intl or IntlShim be moved to the impl/ directory? Whichever one of those files is the one that people aren't supposed to use directly.

I'd suggest calling the public (top level) file Intl.js, and have it load the shim (impl/IntlShim) if necessary.

JCEmmons commented 10 years ago

No - Both Intl.js and IntlShim.js should be in the main. It's OK to use Intl.js directly if you want the IBM implementation always, or IntlShim if you want to leverage any native support that exists. I don't see having both in the top level directory as being a problem.

Regards,

John C. Emmons Globalization Architect & Unicode CLDR TC Chairman IBM Software Group Internet: emmo@us.ibm.com

From: Bill Keese notifications@github.com To: ibm-js/ecma402 ecma402@noreply.github.com, Cc: John Emmons/Austin/IBM@IBMUS Date: 06/18/2014 05:08 PM Subject: Re: [ecma402] Clean up main directory (#47)

One other thing: Shouldn't either Intl or IntlShim be moved to the impl/ directory? Whichever one of those files is the one that people aren't supposed to use directly.

I'd suggest calling the public (top level) file Intl.js, and have it load the shim (impl/IntlShim) if necessary.

— Reply to this email directly or view it on GitHub.

wkeese commented 10 years ago

Well, as @clmath explained in #46 and #20, the standard way to control that is through a has() flag. I don't see any reason to provide two official methods. (Plus which code could still always load impl/IntlShim if it really wanted to.)

JCEmmons commented 10 years ago

Merged...