Displaying 2 results from an estimated 2 matches for "cca008".
Did you mean:
cc7008
2016 May 20
2
identical on closures
Specifically, the srcfile attribute of the srcref attribute of the two
instances of the functions contain different environments, AFAICT.
Environments are compared only by exact pointer, so this forces return
FALSE.
Snippets from .Internal(inspect(x)) and .Internal(inspect(y)):
@cca008 03 CLOSXP g0c0 [MARK,NAM(2),ATT]
FORMALS:
@604b58 00 NILSXP g0c0 [MARK,NAM(2)]
BODY:
@cc9650 06 LANGSXP g0c0 [MARK,ATT]
@604998 01 SYMSXP g0c0 [MARK,LCK,gp=0x5000] "{" (has value)
ATTRIB:
@cc9570 02 LISTSXP g0c0 [MARK]
TAG: @60dd70 01 SYMSXP g0c0 [MARK,LCK,gp=0x4000] &...
2016 May 20
2
identical on closures
I'm confused by this:
> identical(function() {}, function() {})
[1] FALSE
Yet, after loading the Matrix package (which redefines det), the
following is checked (in library.checkConflicts):
> identical(get("det", baseenv()), get("det", asNamespace("Matrix")),
ignore.environment=T)
[1] TRUE
I've looked at the code in identical.c and for closures it