On Thursday, July 18, 2019 at 3:47:51 PM UTC-4, Justin Zamora wrote:
>
> On Thu, Jul 18, 2019 at 1:48 PM Brian Adkins <lojic...@gmail.com 
> <javascript:>> wrote: 
> > I think more people (both existing users and new users) could get 
> > excited about Racket2 if it was primarily about making Racket 
> > objectively better and only secondarily about overcoming the 
> > aesthetic objection to parens. The message of "After years of effort, 
> > now you can program in Racket without using so many parens!" does not 
> > seem compelling to me. 
>
> The discussions about changing syntax are not about aesthetics. There are 
> some 
> genuine pain points in Racket that could be fixed with alternate 
> syntax. For instance, 
> it's easy for structure and array access to become unwieldy in 
> practice. Even a simple 
> example can show how awkward it can be. Suppose you have: 
>
> (struct person (first middle last)) 
> (define john (person "John" "Allen" "Smith")) 
>
> Now you want the person's initials. In Racket, the code is: 
>
> (string (string-ref (person-first john) 0) 
>         (string-ref (person-middle john) 0) 
>         (string-ref (person-last john) 0)) 
>
> There's a load of cognitive and syntactic overhead compared to something 
> like: 
>
> john.first[0] + john.middle[0] + john.last[0] 
>
> Even as someone who has programmed in Scheme for 30 years, I have to spend 
> a couple seconds to grasp what the Racket code is doing, while the 
> alternative 
> syntax is almost instantly understandable. 
>
> Making changes to eliminate such pain points may help new users to 
> consider Racket, 
> but even if they don't, there is still plenty of benefit to existing 
> Racket programmers. 
>
> Justin 
>

You bring up an excellent point, but it does seem to beg the question of 
why use Scheme given there are numerous other languages with a similar 
syntax to what you described?

I'm not trying to be argumentative - as a relatively new lisper, it was my 
understanding that while adding some verbosity, s-expressions enabled macro 
writing, and in turn, macros can eliminate some of the "cognitive and 
syntactic overhead". Also, "cognitive and syntactic overhead" may be 
somewhat subjective (ever waste time looking up operator precedence?), for 
example, I like the ubiquity of the pattern (operator operand1 operand2 
...) - it's simple to understand vs. many, context-sensitive constructs.

If it weren't for the promised value of language extension functionality 
provided by Racket, I *may* have been satisfied with a strict, dynamically 
typed version of Haskell :)  However, I'm not really sure about that - I 
think I weight simplicity & orthogonality *much* more than most 
programmers, so Scheme makes me happy. I think I would rather "clean up" 
your Racket example with syntax extension than use infix expressions with 
dot and [ ] operators, but that's just due to my subjective, aesthetic 
preferences.

We all have a unique perspective on what makes code beautiful; I'll keep an 
open mind that Racket2 may allow me to continue to write beautiful code.

-- 
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/8364a781-168b-47df-8ece-740d6afa8d50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to