[Top][All Lists]

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

Re: effin' compatibility

From: Paul Kienzle
Subject: Re: effin' compatibility
Date: Thu, 29 Sep 2005 00:37:01 -0400

On Sep 28, 2005, at 12:42 PM, John W. Eaton wrote:

Recent versions of Matlab have introduced functions like mkdir that
return logical(1) for success and logical(0) for failure.  Octave has
had mkdir for a long time now, but returns double(0) for success and
double(-1) for failure, same as the underlying mkdir system call.

For compatibility, I think we will have to change the behavior of
Octave's functions.

Perhaps we should rename all the posix system calls to be posix_XXX
instead of XXX, then implement the Matlab compatible behavior in .m
files?  Should we just do this (are these functions widely used
anyway?) or should we expend extra effort to try to make the
transition a bit smoother?  I don't really see a way to make a smooth
transition that doesn't also add a lot of hassle for us, so I'm more
in favor of just modifying the code and breaking backward
compatibility with previous versions of Octave in this case.

Comments or suggestsions?

Maybe we can introduce the notion of namespaces to sort this out?

Something like "namespace octave2" means that all subsequent
function lookups for the remainder of the current context
are done in the octave2 namespace.

This is too much work for this case alone, but this is a
recurring problem, so a general solution would be nice.  There
are a lot of details to work out about the syntax an semantics
of namespaces so it wouldn't be a quick fix.

- Paul

reply via email to

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