Closed apblack closed 5 years ago
The most recent version of collectionPrelude.grace to contain the native "js" code version of lists was c863757; it was removed in the following commit, fc13dbb.
This version should be restored to a separate module, and benchmarked, to see if it is worth reinstating.
The #pragma ExtendedLineups causes the [...] notation to create a mutable object that is like a list
this is kind of horrid, especially if someone tried to run the compiler on something where lineups weren't mutable. Especially if you want that, isn't it better to just write list? or even [].mutable where the .mutable is a no-op and is dropped by the compiler when applied to literals?
What is "kind of horrid"? If you are saying that ExtendedLinups
are horrid, you will find furious agreement here, which is why this issue is here: to remind us to make them go away.
Or are you saying that making them go away and replacing them by list
s is horrid?
They're horrid and yes should be got rid of.
Any code using the "[ ]" syntax for something mutable can't run on any other version of Grace,
and I can't see how that can be fixed with a library (unless "[ ]" is somehow definable)
Inasmuch as I write code, I've barely ever used that notation and haven't missed it.
They are gone, as of commit ca6ecac
The
#pragma ExtendedLineups
causes the[...]
notation to create a mutable object that is like alist
— except that it is missing several of thelist
methods:The reason for
ExtendedLinups
is to improve the speed of the compiler. Otherwise, we should just uselists. For speed, we should just add these missing methods to
ExtendedLinupand re-implement
listto use them. If we don't need the speed, we should get rid of ExtendedLineup and use the version of
list` implemented in collectionPrelude.grace.It's not reasonable to keep both
list
andExtendedLineup
in their present form._t155_primitiveListtest.grace tests
ExtendedLineup
; _t150_collectiontest.grace testslist
.