From 0b4c57a4e5e75232531ec480a5beaa19504339e1 Mon Sep 17 00:00:00 2001 From: Qualadore Date: Sun, 13 Aug 2023 18:17:05 +0000 Subject: [PATCH] Change return type to string --- rfcs/function-debug-id.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/function-debug-id.md b/rfcs/function-debug-id.md index 8aafcfbf..d997a404 100644 --- a/rfcs/function-debug-id.md +++ b/rfcs/function-debug-id.md @@ -12,7 +12,7 @@ When debugging, it is often useful to compare identity. Usually `print` will pri ## Design -`debug.id(value: string | userdata | table | thread | function): number` always returns the identifier unique to that value, and is not possible to override. The identifier can be reused after the value associated with it is garbage collected. +`debug.id(value: string | userdata | table | thread | function): string` always returns the identifier unique to that value, and is not possible to override. The identifier can be reused after the value associated with it is garbage collected. While tables and userdata have individualized metatables, also allowing functions and threads to be passed to `debug.id` would let their type-level `__tostring` be redefined. Strings are useful to accept because of long, similar strings.