Boost logo

Boost :

From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-11-21 11:00:35


In message <0011211548120S.17834_at_[hidden]>, Jose
Orlando Pereira <jop_at_[hidden]> writes
>On Tuesday 21 November 2000 15:23, Kevlin Henney wrote:
>>
>> I hate to point out the obvious -- and perhaps I'm missing something
>> fundamental -- but is there a reason that operator<< is not being used
>> in either approach? It seems to fit with the accepted streaming
>> semantics, populating a descriptor with the data member. As for
>> disambiguation, there is nothing to disambiguate because of operator
>> chaining.
>>
>> I would personally prefer this, esp if a stream-based syntax were used:
>>
>> descriptor << optional(i) << required(j);
>
>I considered it, but as the same method is in XTL used for
>both reading and writing, I was not able to decide wether to use
><< or >>. :-) As I see such methods as generic descritpions
>of the class and not only as an IO mechanism, using a syntax
>that has a strong connection to IO seemed awkward.

Here I'm demonstrating my lack of familiarity with XTL, but just to
clarify, I/O and object description are treated as separate concepts? If
so, I would not have any problem using <<. However, I'm not sure why I
would want to use >> to add something to a description rather than take
something from it :->

>My choice also has historical reasons, as when I started XTL
>the only compiler for Linux was gcc 2.7 and had limited
>support for template specialization. In that situation,
>many data types that can now be described as simple()
>had to be described more precisely. Notice that this
>is still true for many compilers (e.g. VC, for which I
>keep getting pacthes to "downgrade" XTL to what it was
>years ago).

Understood. In the context of Boost, and for both proposals, is it
appropriate to consider the next step forward in terms of syntax?

Kevlin
____________________________________________________________

  Kevlin Henney phone: +44 117 942 2990
  Curbralan Limited mobile: +44 7801 073 508
  mailto:kevlin_at_[hidden] fax: +44 870 052 2289
  http://www.curbralan.com
____________________________________________________________


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk