help-octave
[Top][All Lists]
Advanced

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

Re: equivalent for C-style init: structname varname[] = {...} ?


From: Jordi Gutiérrez Hermoso
Subject: Re: equivalent for C-style init: structname varname[] = {...} ?
Date: Mon, 19 Nov 2012 11:17:54 -0500

On 19 November 2012 11:08, Judd Storrs <address@hidden> wrote:
> Ug. That "bug" was a very nice feature for reading in text files. THANK YOU
> SO VERY MUCH I HOPE YOU'RE HAPPY WITH YOUR COMMIT BIT TYRANNY.

Use the dataframe package instead. It's actually meant to be used this
way, unlike structs. The problem with using setfield and getfield is
that it created fields that couldn't be indexed with the usual
indexing methods of a struct.

Or we could just indeed decide that this is an Octave extension over
the Matlab language and instead deal with the ire of those who
complain about how incompatible with Matlab we are. I suppose they
might yell less. I generally err towards extending Matlab when it made
sense, but it looked to me like using structs as if they were
associative arrays lead to problems, i.e. unindexable fields.

And there is no tyranny here, this is all free software. If you
disagree so fundamentally, you know where the source code is. I
actually decided to patch this bug after consulting with jwe and other
Octave maintainers.

- Jordi G. H.


reply via email to

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