[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: table.maxn...
- From: Brigham Toskin <brighamtoskin@...>
- Date: Sat, 30 May 2015 21:28:20 -0700
This is kind of an interesting point, actually. Does anyone know the rationale for not just automatically tracking the number of entries in a table? Similar data structures in many other languages do this. I know that's not in an of itself a reason to do anything, but it does seem useful. If you know you're dealing with a sequence a sequence, then #t effectively becomes constant instead of logarithmic. And if you don't know it's a sequence (or you know it's not) then you have a convenient counting method that doesn't involve an iterator.
Is it just the (perceived or actual) runtime overhead?