This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC][PATCH v5 00/13][BZ 10871] Month names in genitive case


30.12.2016 19:02 Zack Weinberg <zackw@panix.com> wrote:
>
>
> On Fri, Dec 30, 2016 at 4:32 AM, Florian Weimer <fweimer@redhat.com> wrote:
> > On 12/30/2016 12:53 AM, Rafal Luzynski wrote:
> >> 29.12.2016 17:42 Zack Weinberg <zackw@panix.com> wrote:
> >>>
> >>> [...]
> >>> I think you should just go ahead and change the behavior of %B
> >>> unconditionally. Preserving the old behavior for old binaries is,
> >>> IMNSHO, more likely to preserve existing bugs than to fix bugs.
> ...
> >> But the backward compatibility has been explicitly required
> >> here: [1] and in follow-ups like [2].
> ...
> > These comments were based on your own presentation of the issue, and not
> > independent research, so they are flawed.
> >
> > If this was a bug fix, it should apply to old binaries as well.
>
> For the record, I do think that this constitutes a bug fix.

FWIW, I fully agree here.

>
> > The problem is that your approach breaks about as many usage scenarios as it
> > fixes, and I'm still puzzled why you continue to push for this approach. A
> > 100% backwards-compatible alternative exists, so why not use it? True, a
> > future POSIX update may break backwards compatibility, but that's a POSIX
> > bug in the making, and not something we should follow blindly.
>
> FreeBSD using genitive for %B is a strong argument in favor, I think.

That's true and please note that I don't mean just FreeBSD but
probably whole BSD family which also includes OS X, iOS and
probably more which I'm not aware of.  Other reasons:

1. POSIX will probably accept the same solution in future.
2. Also I'm speaking in the context of this but in glib2:
   https://bugzilla.gnome.org/show_bug.cgi?id=749206
   which exists only because g_date_time_format() calls nl_langinfo().
   glib2 is a multiplatform library; if we provide a solution for Linux
   which is a reverse of BSD/OS X solution then glib2 will have to
   provide one solution for Linux, then another for OS X, then...
   not sure which one for Windows, and so on...
3. With this solution many applications will be fixed automatically,
   without any change in their code.  Also, I must admit, some will
   start displaying month names incorrectly.  With other solution
   nothing will be fixed and nothing will be broken: developers
   will be asked to fix their applications, only then the apps
   will be fixed.

> But there is a way to finesse the issue. Split the patch series.
> Introduce %OB, ALTMON_*, etc., but leave the MON_* data as nominative;
> add the genitive as ALTMON_*. No special treatment for old binaries.
> If that happens quickly, it can make 2.25.
>
> Then the question of which %-code should produce which case is merely
> a question of what to put where in the locale database, and that can
> be deferred and researched in more detail.

Indeed, those two solutions are not different regarding the source
code of glibc.  The only differences are:

- documentation: whether we say that ALTMON and %OB provide
  standalone (nominative) forms and MON and %B provide full-date
  (genitive) forms or the other way round;
- locale database: whether we put standalone (nominative) or
  full-date (genitive) forms into the new alt_mon sections;
- applications: whether the developers will use ALTMON or MON
  and %OB or %B when they want a nominative/genitive case.

Still I'm against this solution.  If you don't mind please
analyze a case of at least one application in at least one
locale which are affected by this problem and how this change
will impact it.

> zw
>
> p.s. Do we know for certain that no other noun cases will ever be needed?

I think the right question is not if other cases will be needed
but rather if more than two cases are needed.  I rely on CLDR:
http://cldr.unicode.org/translation/date-time#TOC-Stand-Alone-vs.-Format-Styles
which mentions only standalone and format (full date) context.
These may be other cases than nominative/genitive as long
as they are only two.  Of course, languages have more cases
which are useful in expressions like "in December" or
"from January to March" or "between May and September" but
these are all attempts to build natural language sentences
rather than format a date.  That's beyond the scope of strftime(),
similarly like it's beyond the scope of strftime() to provide
plural forms of the month names even if they exist in English.

Regards,

Rafal


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]