Page MenuHomeFeedback Tracker

A command to check if two variables reference same array or hashmap
Closed, ResolvedPublic

Description

I'd like to request a way to check if two variables reference same array or hashmap.

Suggested command name and operands:

<Anything> isSameRef <Anything> => <Bool>

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting
Additional Information

Currently this can be partly done with isEqualTo which does seem to do the reference check and returns true, but it still does item by item comparison if they aren't same reference, which can be costly if you're comparing large objects and need to do it often.

Event Timeline

SaMatra created this task.Aug 28 2022, 8:31 AM

rev.149842 isSameAs

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Aug 29 2022, 1:12 PM
BIS_fnc_KK changed the task status from New to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.

An idea for a better name for the command: isEqualRef to be in line with existing isEqualTo

rev 149882

isEqualRef
isNotEqualRef

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Sep 2 2022, 2:03 PM

Did some testing, works as expected so far.

dedmen closed this task as Resolved.Sep 26 2023, 1:53 PM
dedmen claimed this task.