Page MenuHomePhabricator

Function labels don't need to be globally unique
Open, Needs TriagePublic

Description

Functions often have overly specific labels as they try to be unqiue, and then capture the signature, which makes the labels very long. Functions could be named shorter and more memorable if they were allowed to not be globally unique.

This task depends on T400438 to be done first, or else the Functions cannot be distinguished when being selected.

This opens up a possible attack vector, as someone could create a new function with the same name as an established function, and thus lead to users using the wrong function. This could be tampered by requiring function labels to be unique per language and per signature, but I think that the risk of that attack vector is rather small, whereas implementing that might be rather expensive. If it is cheap to implement the "unique per signatur and language" version, it would be good. But I wouldn't block on this and rather make this a new task.