|
Boost Users : |
Subject: Re: [Boost-users] [Tuple] What's the point?
From: Joel de Guzman (joel_at_[hidden])
Date: 2009-07-10 12:26:20
Zachary Turner wrote:
> This may cause some disagreements but I'm honestly not sure that I
> agree with the idea that tuples should behave like sequences. Most
> other languages that enable functional programming style explicitly
> disallow this, and for good reason.
Really? "explicitly"? Can you provide an example of a language
that explicitly states this and the reasons why?
> It leads to bad programming
> style,
Not in my world... Why?
> and makes it all too easy and comfortable to make an arbitrary
> sized tuple, when usually a tuple of larger than a few elements
> indicates a programming design problem.
Why?
> I also kind of agree with the
> philosophy that "sequence" should imply "collection of homogeneous
> types",
Why?
which viewing a tuple as a sequence violates. In other
> functional languages if you need to manually operate on each element
> of a tuple other methods are provided like matching. I actually think
> that it might be possible to achieve some matching like constructs in
> C++, but I don't think (?) much if any research has been devoted to
> that.
Erm... every sentence above begs the question: why?
Regards,
-- Joel de Guzman http://www.boostpro.com http://spirit.sf.net
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net