racket / drracket

DrRacket, IDE for Racket
http://www.racket-lang.org/
Other
448 stars 95 forks source link

Command-line arguments field should report invalid read syntax #408

Open samdphillips opened 4 years ago

samdphillips commented 4 years ago

Inserting any text that is not a vector of strings is silently removed on closing the window.

If the text isn't valid then the user should be notified.

sorawee commented 4 years ago

A strategy that https://docs.racket-lang.org/drracket-cmdline-args/ is using is to parse (in this case it would be read-syntax) at every keystroke, and whenever it fails, change the background color. This gives an immediate feedback to users.

spdegabrielle commented 4 years ago

I’d suggest it should just be text and default to —help.

The reasoning is that if a user is testing they want it to be close to what is entered at the CLI.

spdegabrielle commented 4 years ago

I have what I believe is a better suggestion:

Remove the command line arguments from DrRacket codebase

If users need to create a command line application the plugin https://docs.racket-lang.org/drracket-cmdline-args/ is available. I'd suggest a link to the plugin from https://docs.racket-lang.org/reference/Command-Line_Parsing.html