Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • One of the many nice things about Perl is you get to learn cool words like: autovivification.
  • I'm not sure about Java, but C# has a nifty feature where you can add a constraint that the type used must support a public parameterless constructor.

    class AutoVivifyDictionary<TKey, TValue> : Dictionary<TKey, TValue> where TValue : new() {

        public new TValue this[TKey key] {
            get {
                TValue v;
                if (this.TryGetValue(key, out v)) {