On 4/30/2020 5:40 PM, Sorawee Porncharoenwase wrote:
:
To clarify what I mean: non S-exp languages usually have a line as a
unit of code, so editors need to support "jump to the beginning/end of
line" to make editing pleasant.
Actually, in the majority of programming languages there is no
connection between program source and line grouping in an editor.
Statement based languages define some character to be the statement
"terminator" (or statement "separator" - yes, there is a semantic
difference), but most often that character is the semi-colon, not
#\return or #\linefeed.
Racket, like Scheme and Lisp, is expression based, NOT statement based,
and it can't do the same (at least not easily) because expressions can
be nested arbitrarily, and they can't be limited to a single line.
S-exp languages in contrast has a parenthesized expression as a unit
of code, so editors need to support "jump to a matching parenthesis"
to make editing pleasant. In your notation, it looks like editors need
to also support "jump to closest /" to make editing pleasant.
Also, does it actually make code more readable? I guess I'm not
accustomed to it, and might find it easier to read it once I am.
Once you use Racket (or Scheme or Lisp) long enough, you cease to see
the parentheses and instead perceive the structure of the code from its
indentation. Most editors will happily match parentheses and many can
understand Scheme structure enough to properly indent things.
George
--
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/c49cbf7a-c66b-88ed-5e6f-489a1c075009%40comcast.net.