Conversation

maybe a hot take, but I think this "get it right before i let you run it" approach is straight up bad UX design and it's a shame new languages like Rust haven't rejected it. tell me where I've made mistakes but still let me run my code goddammit
Quote Tweet
I like this article a lot. I can distinctly remember when I first started realizing that working through compile errors and designing the types for my program *was* programming and that fixing those errors was meaningful, important progress. twitter.com/healeycodes/st…
Show this thread
3
11
Use REPL for snips of stuff. But I can’t see the point of trying to run code that is known to be broken. But yes use REPL for the bit you think is right. Or are you saying you need to put a break point in just before the broken bit so you can work out something?
1
Yeah, the elaborator would generate something like a 'ReportedIssue' node when a problem is encountered. This crashes the program if it is run, which would allow you to still experiment with the program while it's in a partially correct state.
2
1
See more info in this thread where I was learning about it:
Quote Tweet
Replying to @brendanzab @ollfredo and 2 others
Ahh, I found it! github.com/ollef/sixty/bl It's neat how you make a new metavariable for errors. In the past I put an error sentinel in my values and it ended up getting really confusing and unmanageable! 😬
3
1
You'd probably need to deal with it for an LSP… error recovery is pretty important if you want to provide more than one error message in the IDE 😅 And for IDE stuff you really want to provide info for broken code, as you are often querying stuff in the middle of editing.
1
1