function getterFn(path) {
  if (getterFnCache.hasOwnProperty(path)) {
    return getterFnCache[path];
  }

  var fn, code = 'var l, fn, p;\n';
  forEach(path.split('.'), function(key, index) {
    code += 'if(!s) return s;\n' +
            'l=s;\n' +
            's='+ (index
                    // we simply direference 's' on any .dot notation
                    ? 's'
                    // but if we are first then we check locals firs, and if so read it first
                    : '((k&&k.hasOwnProperty("' + key + '"))?k:s)') + '["' + key + '"]' + ';\n' +
            'if (s && s.then) {\n' +
              ' if (!("$$v" in s)) {\n' +
                ' p=s;\n' +
                ' p.$$v = undefined;\n' +
                ' p.then(function(v) {p.$$v=v;});\n' +
                '}\n' +
              ' s=s.$$v\n' +
            '}\n';
  });
  code += 'return s;';
  fn = Function('s', 'k', code);
  fn.toString = function() { return code; };

  return getterFnCache[path] = fn;
}
Return the value accesible from the object by path. Any undefined traversals are ignored
@param {Object} obj starting object
@param {string} path path to traverse
@param {boolean=true} bindFnToScope
@returns value as accesbile by path