Re: #matr~ vs ##matr (and: arity, questenian and !!)

Ilya Zakharevich <[email protected]>
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <[email protected]>
On Sun, Nov 26, 2023 at 07:48:32PM -0800, Ilya Zakharevich wrote:
>   #mattr~   optimized in the compiler to (an equivalent to) (matsize(mattr))[1]

Thanks for implementing this!

>   ##object  return “the arity” of the object: 2/1/0 for matrices/vectors/scalars 
>   	    (and maybe -1 for the “tricky” cases, when/if an object may
>   	     be used as a scalar AND as a vector/matrix/etc.).

BTW, on backward compatibility:

  • introducing a new function NEW is not backward compatible, since
    some user may have used #NEW instead of 2.

  • ##EXPR is a very funny way to replace 1.

Hope this helps,
Ilya
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.