#Equals (New) VS Equals

15 messages · Page 1 of 1 (latest)

pulsar storm
#

What's the difference, is one better than the other?

rancid mauve
#

Configure it

supple kestrel
#

You can configure Equals (New) to add more ports to it

rancid mauve
#

You can add ports

pulsar storm
supple kestrel
#

Kinda don’t know why they didn’t deprecate the old equals or just add that ability to it anyways

pulsar storm
#

they should just delete the old one then seems useless

#

wait if they deleted it all the rooms would break nvm

#

im guessing it would have issues if they just updated it too

supple kestrel
#

Deprecation is a thing^

pulsar storm
#

true ig they could just do that

sudden flicker
coarse blaze
opaque garnet
#

It doesnt act exactly as normal equals

  1. You can add/remove ports to the equals, to check if multiple values are equal
  2. Short-circuit execution, instead of calculating every port, it only calculates equal ports, so if you had the items [A,A,A,B,C], it would calculate the first 3 A's and the first B, but it wouldnt calculate C because it doesnt need to, as B does not equal A, so not every value is equal, return false
  3. New equals can check list equality, so [A,A,A,B,C] does equal [A,A,A,B,C], but [A,A,A,B,C] does not equal [A,A,A,B,B], where as old equals would only return true if both lists came from the same section in the circuit graph (Not even same reference list, which is weird)
    @coarse blaze @sudden flicker @pulsar storm @supple kestrel @rancid mauve
pulsar storm
#

Okay so New Equals is just better in every possible way :D