>
> Looks interesting. Do you know any package of this type for DrRacket (or
> another program) that works semantically while you program? (not just as a
> checking tool like View Syntax)
>

I think it would be difficult.

Racket has macros, and it allows shadowing on anything. The attached image
shows how `(if 1 2 3)` is colored differently by Check Syntax due to the
interaction with macros and shadowing.

[image: Screen Shot 2020-10-10 at 10.07.00.png]

To identify which context `(if 1 2 3)` is in, you need to macro-expand the
program and then analyze the expanded program (this is exactly what the
Check Syntax button does). However, macro expansion could be very
expensive. Syntax highlighting on the other hand is supposed to be very
cheap and done immediately as you edit the program. I believe this is why
DrRacket doesn't support syntax highlighting that you described.

If you are OK with a delay (you type something and it's colored, say, 10
seconds later), I think it's possible to use the result from the online
Check Syntax, which macro-expands your program continuously in the
background, to color the program.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CADcuegsmhJdts%3DmvtAAOk%2B1uQ13o_2dTSQEKMBKt0hLrHfVDVA%40mail.gmail.com.

Reply via email to