|
Boost : |
From: Stewart, Robert (stewart_at_[hidden])
Date: 2002-01-23 15:57:15
From: Brey, Edward D [SMTP:EdwardDBrey_at_[hidden]]
>
> Question of being subtly different from printf:
>
> Beman raised the point of the syntax between format and printf being
> different, but too close. The major differences are (1) the name "format"
> vs. "printf", and the placeholders "%1" vs "%u". This seems like a pretty
> substantial difference to me. One could go further by changing the
> placeholder to "[1]", but this doesn't seem necessary for differentiation
> purposes.
I'm of the opinion that combining both formats in the same class/discussion
is the real problem. The two formats work differently and should not be
allowed to intermingle. IOW, I think there should be a class that provides
type-safe printf() functionality, and another, that needs more work and
discussion, that provides positional parameters and various i18n formatting
options.
From what I've seen, Boost.Format does the printf()-compatible stuff quite
well. The other part is still controversial and, therefore, quite possibly
not yet ready for acceptance.
> [Samuel]
> >the non-legacy formatting code is very minimalistic..
> >It relies on the printf directives for left/right/centered alignment,
> padding,
> >and all other fancy formatting options.
> >I felt that designing a new syntax for precise formatting would
complicate
> the
> >whole thing even more, so for now the new syntax is just "%1", "%2",
etc..
>
> OK. Since the printf formatting rules are OK, it is reasonable to reuse
> them. It would be different if they were very difficult to use.
I understand the rationale, here, but I'm still bothered by the
juxtaposition of new and old.
> >My decision was to provide 2 possible notations :
> >- one basic, very concise notation to adress simple needs
> >- printf notation for printf compatibility OR for any precise
> >formatting need.
> >(the new formatting features are provided in this style of notation,
> >not the short one)
>
> OK. This wasn't clear to me from your documentation.
Separate classes would make this much easier to understand. That would also
allow each to be reviewed and discussed separately, but it may be too late
for that.
> >on the same note, I'm not sure what to do with the first name, but I
> >think the whole sentence should be :
> >"ideas from both Rüdiger Loos' and Karl Nelson's formatting classes"
> >Is this right ?
>
> Good question. I've often wondered this myself. I couldn't find an
> authoritative answer after a bit of looking. I suspect that either is
> acceptable. Even the opinion of how to handle appostriphies after names
> ending in "s" seems to vary a bit.
In my reference book, _Writing:_A_College_Handbook_, it says:
"1. If the noun is singular, add the apostrophe and '-s'.... The
final '-s' may be omitted in a singular proper noun ending in '-s'."
Hence, "Rüdiger Loos'" or "Rüdiger Loos's" are fine.
Rob
Susquehanna International Group, LLP
http://www.sig.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk