Re: [PROPOSAL] Deprecate global functions in query server

2015-12-12 Thread William Edney
So I'm a lurker here and most of you don't know me, so feel free to ignore my opinion here :-). I've only been getting into CouchDB heavily lately, but have been doing JavaScript for quite a few years. My first thought is that whatever change is going to me made here that be done such that it lead

Re: [PROPOSAL] Deprecate global functions in query server

2015-12-12 Thread ermouth
> this.emit(doc.key) Normally this.propName points to the ddoc property, if any. So better this._emit since properties with _ are prohibited for docs. ermouth 2015-12-12 16:03 GMT+03:00 Jan Lehnardt : > I’m in favour of doing something like this. > > How about adding them to the function in que

Re: [PROPOSAL] Deprecate global functions in query server

2015-12-12 Thread Jan Lehnardt
I’m in favour of doing something like this. How about adding them to the function in question? So function(doc) { emit(doc.key) } would become function(doc) { this.emit(doc.key) } +1. no need to mess with the function signature. +2. no clunky here’s-a-bunch-functions object that isn’t alr