icecave / collections

A PHP collection library loosely inspired by the .NET runtime and the C++ STL. [DEPRECATED]
MIT License
70 stars 2 forks source link

Type checking. #16

Open jmalloc opened 11 years ago

jmalloc commented 11 years ago

Collection types should allow users to provide a callback used to check the type (or any other attribute) of elements being inserted.

It would be neat if there was an easy way to provide a typhoon expression too, but a callback is still necessary as a future C/pecl version of collections will not support typhax parsing.

jmalloc commented 11 years ago

This is becoming problematic from a memory-footprint standpoint. Collections are having to store previous state for rollback conditions. Removing from 0.6.0 for now.