On Fri, Aug 6, 2021 at 5:44 PM David Roe <roed.m...@gmail.com> wrote: > > I think Nils' original solution, of adding an immutable keyword option to the > parent, is a good one. I've run into a similar issue with matrices, where I > had to make them immutable before using them as dictionary keys. > David >
I agree with both of you. (My example above was just arguing not to completely remove mutable vectors.) > On Fri, Aug 6, 2021 at 7:39 PM Nils Bruin <nbr...@sfu.ca> wrote: >> >> On Friday, 6 August 2021 at 16:31:23 UTC-7 wst...@gmail.com wrote: >>> >>> To clarify, by "similar reasons to numpy", I meant that you open up >>> the possibility of using Cython, vectorized operations, JITs like >>> numba, etc. Some of these provide order of magnitude speedups and >>> aren't an option with generic Python lists. >> >> >> To clarify, this thread certainly didn't start out with the question if sage >> should have mutable vectors at all (although I do think that in most cases, >> an array would then work just as well). I think it is worth reconsidering >> whether all vectors need to start out their life being mutable, because that >> does come with a significant usability penalty in hash-related scenarios. >> >> It is indeed the case that we could just spell these examples as >> {tuple(v+w): ... }, and probably that is what cached_function argument >> manglers do, but .... to me that just looks super ugly (and the annoying >> part is that it'll take me a error for every time I need to insert that). >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-devel" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sage-devel+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sage-devel/430ef312-156b-4364-8b73-456429d9decan%40googlegroups.com. > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-devel/CAChs6_nTdsobT2_5_ZAG6Fvt4d3yH9wn-YcJ8013Ws3oMjGEJg%40mail.gmail.com. -- William (http://wstein.org) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CACLE5GAUbL4pQZoNJVDdpbX7tR_s%3DQQvSxB47Lw_sTN%3Du_KQLg%40mail.gmail.com.