octave-maintainers
[Top][All Lists]
Advanced

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

Re: pcg.m replacement for OCTAVE


From: Jordi Gutiérrez Hermoso
Subject: Re: pcg.m replacement for OCTAVE
Date: Wed, 7 Sep 2011 16:05:09 -0500

On 7 September 2011 15:41, Andrew Knyazev
<address@hidden> wrote:
> Just for curiosity, what is the point of intentionally making Octave
> core codes, such as pcg.m, such that they cannot be run in MATLAB
> and cannot be edited by the MATLAB editor?

I think it's mostly about aesthetics and consistency. We want our code
to all follow the same style. The % character is a very dumb comment
character, inconsistent with just about every other scripting
language, and therefore make its impossible to use shebangs (e.g.
#!/usr/bin/octave). The other Octave differences are because it's much
more readable, in general. Being explicit about the block you're
closing (endif, endfor) is easier on the eyes. Some of it is also
historic; Octave didn't start out being and still *isn't* a Matlab
clone. Finally, our goal isn't to make it easy to edit Octave code in
Matlab. Our goal is to make it easy to run Matlab code in Octave, and
we don't need to make our Octave code ugly like Matlab's for this
purpose.

An alternative for you could be to use an editor that understands both
Matlab and Octave syntax. There are many choices such as Kate, Gedit,
Notepad++, as well as the venerable Emacs (or vim) that understand
both Matlab and Octave syntax.

HTH,
- Jordi G. H.


reply via email to

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