Please vote once and for good: range operations

Steven Schveighoffer schveiguy at yahoo.com
Wed Jan 28 18:12:22 PST 2009


"Andrei Alexandrescu" wrote
> Steven Schveighoffer wrote:
>> So I'm not sure there's any point in listing C# as a viable candidate to 
>> steal property names from ;)  C# and .net in general I think suck in 
>> terms of standard containers/algorithms anyways.  It's one thing I don't 
>> like about it.
>
> While searching various language samples/standard libs, I couldn't stop 
> noticing that .Net had the most childish concepts and the least appealing 
> APIs and code samples. Looked like 21st century Visual Basic to me, only 
> more verbose.

It is a pain, when coming from C++ which has the very impressive STL.  One 
of the things I absolutely hated is you cannot enumerate the elements in a 
hashtable and remove them as you enumerate (technically, D's builtin AA has 
this issue as well, but I have that ability in dcollections, and hopefully 
there will be a builtin range with that ability in the future *hint hint*). 
I have this really stupid piece of code where I enumerate through a lookup 
cache for finished threads, adding them to a list, then after enumerating 
through the hashtable, I have to remove them one at a time from the table by 
using the values I stored in the list, using a lookup each time to remove 
each element, when I could have removed them all without any extra penalty 
while traversing.

-Steve 





More information about the Digitalmars-d mailing list