Skip to content

Tag equality is based on memory address #474

@ryco117

Description

@ryco117

Hey, I noticed that the userdata tag equality seems to be address-based instead of content-based and I was wondering if you had done this as a conscious decision or if you were open to changing it?

YASL_GETUSERDATA(vm_peek(&S->vm, S->vm.fp + 1 + n))->tag == tag;

I understand the efficiency perspective of only comparing the address, especially when it is largely assumed that the tag is a static string, however, API caller will likely expect strings to be compared based on the content and I wanted to get your feedback before I wrote a big disclaimer about this in my docs🙂

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions