This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bracket heresies. What about subscripting?



CB = Chris Bitmead <chris@tech.com.au>
CB> Lars Arvestad wrote:
>> While the smiley might cover the first sentence as well as the 
>> second, I would like to point out that there are certainly 
>> situation when you need a vector, even if you want to write 
>> your programs functionally.

CB> Well I did say "much". It is rather difficult I think to write
CB> functional code with vectors. Vectors usually imply the notion of
CB> changing slots. Don't you think?

Sure, but my point is that you might have a fully functional mindset,
but still be better of using vectors. I have written simple code for
computing (basically) string edit distance using vectors, but
otherwise use a functional approach (with looping by recursion
et.c.). It is only the vector manipulation in that program that is
non-functional, so I'd like to say that I used a functional programming
style. I have seen a full research article for solving the same
problem in a purely functional programming style, so even if I did not 
read that article I'd say that you are better of compromising.

Furthermore, if you want to write code for mathematical vectors and
matrices, you will also end up with vectors at the bottom. Yet, with a 
nice encapsulation such as the one Mikael showed us, you will pretty
much use a functional programming style.

Hmm, have I started rambling? I guess my ego was hurt when my scheme
coding practices were questioned. :-) How about a support group for
obsessive vector users? Anyone interested? "Hi I am Lars Arvestad and
I have used vectors for 17 years."

	Lars

-- 
Lars Arvestad               Dept. of Numerical Analysis and Computing Science
                       Royal Institute of Technology (KTH), Stockholm, Sweden

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]