|
Boost : |
Subject: Re: [boost] 5 Observations - My experience with the boost libraries
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-03-24 10:59:26
Tom Brinkman wrote:
>
> >> C++ encourages all sorts of programming practices that I
> >> wish I never learned and have never been very useful to
> >> me as a programmer.
> >
> > What are those? I can't say I know of anything that fits
> > that description. If you can give concrete examples, we
> > could make them Boost guidelines.
>
> Easy, object orientated developement.
Object oriented development is just one of several paradigms supported by C++. The language hardly encourages it over the others, regardless of its popularity with any given group of C++ developers.
I happen to write a good deal of OO code and it works very well for me and those using my code. I also write functional code, depending on the need.
> I am a functional style programmer, as are most boost developers.
> Thats why I follow boost. I hate OO style code.
There sure are an awful lot of classes in Boost for such a functional-style focus as you describe.
> I regularly show my collegues cool functional programming techniques
> that I learned here on boost.
>
> You would be surprised how "C" orientated programmers can quickly be
> converted to functional programming if you just show them small simple
> examples of what its all about.
C programmers write a good deal of object oriented code. Just look at all of the opaque handles they create with associated functions to manipulate a data structure. That has been the basis for a great deal of C code over the years and it hasn't been a bad thing.
Functional programming is not a panacea. It is another tool in the box. It should be used more than it is, but it doesn't replace other approaches generally.
> This is where boost has not met its potential. Education. So much
> more could be done to educate the masses about the wonders of
> functional programming.
By virtue of template metaprogramming, there is a good deal of functional programming in Boost. However, we've already observed problems with that programming style in this thread. Languages like Haskell make functional programming first class and should probably be preferred when doing only functional programming. That leaves me to wonder how much Boost can or should do "to educate the masses about the wonders of functional programming."
_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk