Boost logo

Boost :

From: Brian McNamara (lorgon_at_[hidden])
Date: 2003-08-17 20:44:22


On Fri, Aug 15, 2003 at 02:44:20PM -0400, Joel Young wrote:
> I tried using FC++ a while ago for flexibly expressing and passing
> around linear algebra pipelines and I found this lack of mutable
> reference parameters to be highly constraining and insanely frustrating.
> I wanted to be able to take a reference to a vector as a parameter and
> return that same vector, mutated, as a return value. I started to hack
> FC++ to remove the const on the references but after a bit gave up.

I should have mentioned as an aside what I did in FC++ for input/output;
I made functoids in_stream and out_stream which take pointers to streams
as the lhs:

   &cout ^out_stream^ x ^out_stream^ y ^out_stream^ z;
   // cout << x << y << z;

This is one way to "functoidize" such operations. It's unclear to me
if/how useful this is.

A question I should I asked before: why were you using FC++ in the
first place? (That sounds too accusatory. :) ) What feature(s)
motivated its use? Can you give an example of a "linear algebra
pipeline" that you might want to express as a functoid (or something)?
I'm afraid I don't have a good enough sense of the domain and what FC++
features you wanted; there may be some useful solution along a
completely different path...

-- 
-Brian McNamara (lorgon_at_[hidden])

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