couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Shorin (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-1397) Function expressions, evals in SpiderMonkey
Date Sat, 04 Feb 2012 19:57:53 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200525#comment-13200525
] 

Alexander Shorin commented on COUCHDB-1397:
-------------------------------------------

[offtopic]
Sorry for offtopic, but

@Marcello,

Why not to use black box testing instead of trying to mock every internal query server global
function? Using QS directly as black box you will have warranty that your functions are tested
well, because box is real, but you don't have to know how it works. In your way you testing
for your own, may miss some details and output result could be different. This is not only
about views that are not so complex as show or list functions. By the way, applying your idea
to other functions I'll something weird for list function:

function(head, req, provides, registerType, getRow, send, start, whatEverWillBeAddedInFuture){
 ...
}

Looks not much relaxing(: Certainly, Javascript allows to skip some function arguments definition,
but it still requires(?) them in right order. 

And what about other query servers in this case? Currently, they are doing same work as Javascript
one or just trying to do, but not all of them could skip arguments definition, has arguments
vectors etc. This could create additional problems with migration from one QS to another.
[/offtopic]

About subject, I couldn't say anything important about function(...){} vs function name(...){}
vs ... because I don't use Javascript query server, but in Python I have to write real functions
with their names - it works as nice marker to find their crush in debug logs if it happens,
so for me this is just nice feature(:

P.S. Just a moment, what will happens with CoffeeScript in case of proposed changes?
                
> Function expressions, evals in SpiderMonkey
> -------------------------------------------
>
>                 Key: COUCHDB-1397
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1397
>             Project: CouchDB
>          Issue Type: Bug
>          Components: JavaScript View Server
>    Affects Versions: 1.2.1
>         Environment: All
>            Reporter: Jason Smith
>
> New SpiderMonkey releases do not eval() a sole anonymous function expression. That is
not a valid JavaScript statement, and so it is not a valid JavaScript script.
> COUCHDB-1302 addressed this for 1.1 and the 1.1.x branch. This ticket is for 1.2. (Sorry
to spam COUCHDB-1302. I saw "Unassigned" and read "Unresolved.")

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message