Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-22 Thread Gustavo Massaccesi
[I remember an old discussion about this, but I can't find the message.] For small number of clauses, case is expanded to a bunch of if. When there are more than ¿12? it may be use a hash table or binary search. It has a few tricks:

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-22 Thread George Neuner
On 8/21/2019 3:25 PM, Jon Zeppieri wrote: Racket's `case` is an implementation of this approach: http://scheme2006.cs.uchicago.edu/07-clinger.pdf It is not significantly complicated by `else`. And that approach was created in the context of Scheme, which leaves the return value unspecified

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread Jon Zeppieri
On Wed, Aug 21, 2019 at 2:43 PM George Neuner wrote: > > > On 8/21/2019 1:13 PM, Gustavo Massaccesi wrote: > > The expander in racket adds something equivalent to > > [else (void)] > > if there is no else clause. (Try an example with the Macro Stepper.) > > So an explicit else clause would

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread Chris Stephenson
Yes this year we put a lot of effort into reducing any kind of change between the two halves of the course, even changes of approach independent of language This worked well for students. the first 5 days or so was a slightly enhanced version of Bootstrapworld Algebra. However, we wanted

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread George Neuner
On 8/21/2019 1:13 PM, Gustavo Massaccesi wrote: The expander in racket adds something equivalent to     [else (void)] if there is no else clause. (Try an example with the Macro Stepper.) So an explicit else clause would not change the speed of the programs. In some cases the compiler can

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread George Neuner
On 8/21/2019 11:01 AM, Hendrik Boom wrote: On Wed, Aug 21, 2019 at 10:52:57AM -0400, George Neuner wrote: > > I don't like the idea of compulsory 'else' - for 'cond' or 'case' or > 'match' or ... > > 'Else' isn't needed if all input cases are covered, but in almost all > real world uses,

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread Christopher Lemmer Webber
Christopher Lemmer Webber writes: > Gerald Sussman explained Python's success, and the reason for the switch > from Scheme and SICP to a Python based curriculum, as being because > Python had for whatever reason libraries that allowed students to be > able to lego together examples very quickly.

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread Christopher Lemmer Webber
Chris Stephenson writes: > Parantheses and learners - experience with 14-18 year olds > > I have just finished giving a two week intensive course to 14-18 year olds > at the Mathematics Village near Ephesus in Turkey Very interesting email all around! > (a) A change of syntax between the two

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread Gustavo Massaccesi
The expander in racket adds something equivalent to [else (void)] if there is no else clause. (Try an example with the Macro Stepper.) So an explicit else clause would not change the speed of the programs. In some cases the compiler can prove that the else part is not necessary and drop it,

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread Shriram Krishnamurthi
I agree that struct-copy is almost essential. That's why it's baked into the syntax of Pyret (where we're very sparing in what we provide syntactic surface to). It might be better to just import struct-copy and leave the language-level intact, in the future (if not create a language level that

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread Hendrik Boom
On Wed, Aug 21, 2019 at 10:52:57AM -0400, George Neuner wrote: > > I don't like the idea of compulsory 'else' - for 'cond' or 'case' or > 'match' or ... > > 'Else' isn't needed if all input cases are covered, but in almost all > real world uses, the compiler is not able to prove the 'else' is >

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread Hendrik Boom
On Wed, Aug 21, 2019 at 02:55:46AM -0700, Chris Stephenson wrote: > Parantheses and learners - experience with 14-18 year olds ... ... > > Do we have parenthesis problems? > > Yes. Worse for students with previous programming experience. We solved > them by educating our students in the clues

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread Chris Stephenson
Hi Shriram Nice to hear from you! In a course for 14-18 year olds where we are rigorously enforcing the design recipe, the overwhelming majority of errors are, indeed, syntax errors. (Except for missiing-else conds, of course) So that was what I meant. Pyret syntax errors are reported

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread Shriram Krishnamurthi
> > > Pyret was a pain. Error messages were not clear and the whole change >> confused students. >> > > Can you elaborate more on this? My personal experience with Pyret is that > it has an exceptionally good error message, except when an internal > error occurs (which should not happen). > IMO,

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread Sorawee Porncharoenwase
Pyret was a pain. Error messages were not clear and the whole change > confused students. > Can you elaborate more on this? My personal experience with Pyret is that it has an exceptionally good error message, except when an internal error occurs (which should not happen). Two language features

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-21 Thread Chris Stephenson
Parantheses and learners - experience with 14-18 year olds I have just finished giving a two week intensive course to 14-18 year olds at the Mathematics Village near Ephesus in Turkey The course is based on Bootstrapworld Algebra and Reactive. Internet is very poor in the village, so we cannot

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-17 Thread Dario Maiocchi
HI all, I would personally be unhappy if in racketlang2 we would remove the (). I don't think they represent a real issue. Just to share my personal experience a professional programmer. I learned clojure like 7 months ago and now I'm learning racketlang and I never felt the () as a

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-07-26 Thread Hendrik Boom
On Thu, Jul 25, 2019 at 09:42:10PM -0400, Greg Hendershott wrote: > > This makes me wonder if some experienced programmers dislike simple > syntax, not just because it is unfamiliar to them, but also because it > is too simple to serve as an effective in-group filter. If humanities > students are

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-07-25 Thread Greg Hendershott
> I've taught the exact same material at the start of a 3rd year CS PL > course, and the students there didn't find the syntax as easy as one would > hope for students with that much CS “experience”. In fact, unsurprisingly, > many find the syntax as hard as expected for having trained on very >

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-07-25 Thread Alexander Shopov
To whoever will implement a new syntax forRacket, may I give the following resources. I really hope they are widely known and I am just stating the obvious common knowledge. There have been previous attempts of using an alternative syntax: * M-expresisons - dating to the original McCarthy Lisp

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-07-24 Thread Hendrik Boom
On Wed, Jul 24, 2019 at 08:06:18AM -0700, Will Jukes wrote: >- On the other hand, parenthesized syntax is a natural way of conveying >the difference between statements and expressions, and that's lost in >moving away from parenthesized syntax, so there's some trade-off there. Is

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-07-24 Thread gfb
On Wednesday, July 24, 2019 at 1:40:25 PM UTC-4, sk wrote: > > To riff on Will's message: > > In the Bootstrap:Algebra > materials, we use > Racket syntax because it's a powerful pedagogic device. Recently, for > various reasons, we've ported

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-07-24 Thread Shriram Krishnamurthi
To riff on Will's message: In the Bootstrap:Algebra materials, we use Racket syntax because it's a powerful pedagogic device. Recently, for various reasons, we've ported this over to another language called Pyret (while also maintaining the

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-07-17 Thread Christopher Lemmer Webber
Hendrik Boom writes: > On Wed, Jul 17, 2019 at 04:52:37PM -0700, Maria Gabriela Guimarães wrote: >> >> Does Racket wants to be popular in the industry? Then Racket must focus on >> being a language-oriented programming ecosystem on a popular VM, like the >> ErlangVM, the JVM, and the

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-07-17 Thread Hendrik Boom
On Wed, Jul 17, 2019 at 04:52:37PM -0700, Maria Gabriela Guimarães wrote: > > Does Racket wants to be popular in the industry? Then Racket must focus on > being a language-oriented programming ecosystem on a popular VM, like the > ErlangVM, the JVM, and the WebAssemblyVM. This means to stop

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-07-15 Thread Shriram Krishnamurthi
P4P is also very much "current", as far as I'm concerned. (In fact, I'm quite likely about to use it in a new setting.) Pyret is a parallel branch effort. Pyret is "let's just go all out and design a new syntax". Specifically, I was tired of dealing with people who wouldn't read *How to

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-07-15 Thread Hendrik Boom
On Mon, Jul 15, 2019 at 11:26:06AM -0700, Wesley Kerfoot wrote: > Has anyone considered http://shriram.github.io/p4p/ as an alternative? > > The idea in a nutshell is to get rid of the implicit `(begin ...)` that > many of the forms have, and use that to reduce the number of required >

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-07-15 Thread Neil Van Dyke
Wesley Kerfoot wrote on 7/15/19 2:28 PM: Has anyone considered http://shriram.github.io/p4p/ as an alternative? This might represent Shriram's current thinking (and is what I was alluding to before): https://www.pyret.org/ I'll wait for the official community process to commence, before I