13:50
<Jack Works>

ecmarkup language service update:

I added underline to AOs that might trigger user codes. I need a temperature check, do you think this is good, or visually annoying?
I found usually ? and ! before the AO call indicates if it triggers user code or not.

14:18
<Richard Gibson>
underline to me suggests "link" rather than something so esoteric (e.g., as applied to #sec-array.from in the screenshot). Also, ! before the call is generally an indication that it does not call user code (because user code can always throw)
14:36
<jmdyck>
I'm doubtful that ? is that good an indicator either.
14:41
<Jack Works>
underline to me suggests "link" rather than something so esoteric (e.g., as applied to #sec-array.from in the screenshot). Also, ! before the call is generally an indication that it does not call user code (because user code can always throw)
in rust-analyzer, they use an underline to indicate a variable is "let mut" not "let"
14:43
<Jack Works>
(I'll also do this later, if a variable is mutated in the emu-alg, it will have an underline)
14:44
<bakkot>
Jack Works: "can call user code" is a property of AOs which is tracked in the biblio. ! before a call of an AO which can normally call user code is taken to indicate that it doesn't in this case. there's also an annotation for explicitly marking snippets as calling or not calling user code. see https://tc39.es/ecmarkup/#effects
14:44
<bakkot>
(this is viewable on the spec by pressing u)
14:44
<bakkot>
having this exposed in the language service seems good, but ideally it should use the same rules as ecmarkup
14:46
<bakkot>
personally I find the underline not the ideal way of displaying this - I'd probably do like <sup>u</sup> after the AO name or something - but the underline is fine too
14:54
<Jack Works>
having this exposed in the language service seems good, but ideally it should use the same rules as ecmarkup
currently I only read it from the biblio. AOs defined in the current file (usually proposal AOs) are ignored (because I don't do a full analysis yet)
14:55
<Jack Works>
personally I find the underline not the ideal way of displaying this - I'd probably do like <sup>u</sup> after the AO name or something - but the underline is fine too
I also tried Inlay Hint to show a "uc " before the AO like webpage do, but it took too much space and visually worse than underline imo
14:55
<Jack Works>
<sup> is not possible due to the editor limit
15:10
<bakkot>
if the editor lets you add characters, just not sup, you could use unicode AO ᵘᶜ