octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Are we (nearly) ready for 3.4 yet?


From: CdeMills
Subject: Re: Are we (nearly) ready for 3.4 yet?
Date: Wed, 5 Jan 2011 01:21:31 -0800 (PST)

My 20 Euro-cents suggestion is: one of the big achievement of 3.2 was the
introduction of classes. As most of the legacy code was written before,
there are sometimes functions where the output is supposed to be of the same
class as the input: think about 'mean' f.i. The code stream should thus be:
take the input and serially apply transformations, in such a way that the
final result is of the same kind as the input data. I already spotted a few
places where the final result is simply initialised as
result = zeros(some rows, some columns)

A better implementation would be
result = zeros(some rows, some columns, class(the input))

Or, even better, use
result(some condition) = 0
using the class subsasgn operator.

This kind of verification has to be performed on each function. Could this
kind of test be automated ?

The problem behind is of type chicken-and-egg. Having classes is usefull,
but as the code is not 100% compatible with classes, this make using classes
problematic for now. 

Regards

Pascal  
-- 
View this message in context: 
http://octave.1599824.n4.nabble.com/Are-we-nearly-ready-for-3-4-yet-tp3088720p3175044.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]