@PaniczGodek @aartaka @jack I'd also argue that differing definitions is still a problem in languages without a REPL!
As soon as you change a database schema, or gradually deploy a system with new features, or deserialise data from an old version, or have non-trivial JS calling backend code, you have similar issues.
Wilfred Hughes
@PaniczGodek @aartaka @jack I am working in a toy PL (Garden) in this space, but details like go-to-def logic become more complicated when you allow redefinition.
Wilfred Hughes
@wilfredh @PaniczGodek @aartaka Are you assuming that the editor will be connected to a live system that can show you the source code of a given function when it was last compiled? In that scenario, the only tricky bit is the UX to show the difference between what’s in the file/on-disk and what has been compiled in the running image…
Jack Rusher@jack@berlin.social
@jack @PaniczGodek @aartaka Yeah, exactly.
The devil's in the details though. If the loaded function was on line 20, do you try to find the current version on line 25, or just pop up a buffer of the loaded version? Where does the user then edit?
One idea I've been thinking about is making the interpreter session speak LSP. That way you'd have go-to-def and completion based on loaded definitions, but it's unconventional.
Wilfred Hughes
@wilfredh but wait, isn’t LSP file-oriented? Clojure one is, and it sucks.
@jack @PaniczGodek
Artyom Bologov@aartaka@merveilles.town
@aartaka @jack @PaniczGodek Well, LSP reflects the state of the editor: the editor sends didOpen at the start, then didChange on every edit. So the server knows the editor state even without saving.
Sounds like you have a different model in mind though?
Wilfred Hughes
@wilfredh no, I simply didn’t know about it! Thanks for the details!
@jack @PaniczGodek
Artyom Bologov@aartaka@merveilles.town