laurent.orseau
2020-12-29 08:50:07

You already have the optional delimiter #;and ;) More seriously, I’m not a big fan of the commas. You could have a style guide that imposes a newline after each binding?


kellysmith12.21
2020-12-29 11:31:38

I think that encouraging newlines makes sense.


rokitna
2020-12-29 12:23:54

this flies in the face of conventional let syntax, but how about changing up the order so the punctuation acts as the delimiter? {let = a 1 = b 2 = c 3 #:in (+ a b c)}


kellysmith12.21
2020-12-29 12:33:16

Using the = prefix goes against my goal of having the syntax be easy for new programmers. Also, I instinctively parse that style wrong, which goes against the unofficial goal of having the syntax be easy for me :sweat_smile:


laurent.orseau
2020-12-29 12:45:08

How about {let a 1 let b 2 let c 3 #:in ... } ?


laurent.orseau
2020-12-29 12:46:25

Or even ... in ...


laurent.orseau
2020-12-29 12:46:53

Or ... begin ... ?


laurent.orseau
2020-12-29 12:49:12

But for readability maybe you prefer {let's assume that a is 1 and let's assume that b is 2 and ... then what we're gonna do is we're gonna ... }


kellysmith12.21
2020-12-29 12:55:31

The series of let is ok in a single-line context, but feels excessive, when split across several lines.

Regarding the keyword #:in, I chose it since it’s found in other languages. There is exactly one expression following an #:in, so using begin wouldn’t be right.


kellysmith12.21
2020-12-29 13:28:25

I’m sorry, I hope that I wasn’t rude in my responses.


laurent.orseau
2020-12-29 13:41:08

what part of your responses could be construed as rude? :smile:


laurent.orseau
2020-12-29 13:43:01

I’m not replying merely because I can’t find anything sensible or funny to say :)


kellysmith12.21
2020-12-29 13:50:53

I’m rather shy and have a bad habit of unnecessarily apologizing, for fear of something I may have done.


gknauth
2020-12-29 14:25:57

With this back-and-forth between a = 1, (a 1), = a 1, etc., it occurred to me they all are supposed to mean the same thing, but what changes is the user’s preference. What if the user could keep the meaning but toggle between a = 1, (a 1), = a 1, etc.? I know that’s kind of crazy, but it would be a way for Racket to advertise, sort of, “we have our conventions, but if you have yours, and you want to see the code the way you want to see it, so long as we understand what you meant, we can change the view to your preference, so long as you are consistent.”


kellysmith12.21
2020-12-29 14:31:30

How would the toggling happen?


laurent.orseau
2020-12-29 14:37:40

If the user can easily change the style from one sexp to the next, that’s likely going to lead to inconsistent (read: horrible) coding style.


sorawee
2020-12-29 14:42:47

Not necessarily.


sorawee
2020-12-29 14:43:29

If you can convert between styles automatically, why would there be inconsistence?


laurent.orseau
2020-12-29 14:44:22

I’m not talking about the kind of coders who fix their own conventions and stick to it, but the other kind (like me, half of the time) :wink:


laurent.orseau
2020-12-29 14:44:38

or I misunderstand what you’re saying


sorawee
2020-12-29 14:48:42

Let me give an example. Say I write (= a 1) in a file. You then open it with NeoDrRacket, and choose “infix style”, then you would see a = 1.

You then write in the next line b = 1 and save.

When I open the file again, with the “traditional style”, I would see (= a 1) (= b 1)


laurent.orseau
2020-12-29 14:50:33

Ok, so that’s the kind of global option that my assumption was ruling out in my first message. A global style would be fine. But if the style can change from one line to the next, it’s less likely to be fine.


sorawee
2020-12-29 14:52:56

ah, i see.


laurent.orseau
2020-12-29 15:02:49

And now you make me realize I didn’t read @gknauth’s message carefully enough :)


kellysmith12.21
2020-12-30 04:01:01

Being able to dynamically reconfigure surface syntax like that would be very interesting, but I assume that macros would complicate it.