Open FluffyGhoster opened 2 weeks ago
+1, I would want this enforced codebase-wise, though I would not allow extending a procs signature with more variables.
/datum/proc/test(mob/a)
should fail when /datum/extension/test(mob/a, atom/b)
is encountered since it adds space for errors. Or the logic should be way more complex, and it should check to make sure that if you are using test(a, b) then you are calling it on a /datum/extension
and not a variable typed with /datum
Basically what we discussed in Coderbus:
It's possible to create awful and confusing scenarios using the proc inheritance and changing the arguments type of the proc, eg:
It would be useful to have a per-proc option to set, which follows eg. this rules:
--- If SHOULD_RESPECT_PROC_SIGNATURE(LAZY): ---
--- If SHOULD_RESPECT_PROC_SIGNATURE(STRICT): ---
Optionally, there should be a pragma/setting to enforce it codebase-wide, ontop of the per-proc option (which is more transitional)