The AA .get function is defined like this: Value get(Key key, lazy Value defaultValue) { auto p = key in *cast(Value[Key]*)(&p); return p ? *p : defaultValue; }
Can we also have an overload that uses Value's init value as fallback? That would simplify checks like this: if (headers.get("transfer-encoding", "") == "chunked") if (headers.get("transfer-encoding") == "chunked") This is what STL map's operator [] does, and I think it's handy. It only requires the addition of this overload: Value get(Key key) { auto p = key in *cast(Value[Key]*)(&p); return p ? *p : Value.init; } It would also make these kind of accesses more efficient, since you skip the lazy delegate.