Am 10.11.2010 18:51, schrieb Riccardo (Jack) Lucchetti:
On Wed, 10 Nov 2010, Sven Schreiber wrote:
>
> So to get the member names for list objects I would suggest to replace
> the syntax 'mylist' with:
> 'print mylist --membernames'
> or somesuch.
>
> I'm sure no everybody will like it at first sight, but once you start
> thinking about it, isn't it compelling... ;-)
Using an empty string as an alias for the "print" command is quite
common in matrix languages like Matlab/Octave, gauss etc; I personally
find it very useful when working in interactive mode. Actually, I'd like
it even better if it was an alias for "eval", so you could print out
complex expressions "on the fly".
I can see the use in interactive mode, for scripts I consider it bad
programming style and reduces readability quite a bit, but that may just
be me.
However, with lists I don't have a choice if I want the member names,
and that's what bugs me most. So I really think at least the undecorated
'mylist' line should get an alias like I suggested above.
> From a strictly aesthetic point of view, I'm more worried about another
idiosyncratic aspect of lists: you can't delete them!
Hm, why is that so, actually?
-sven