News for hackers. Stuff that matters.
Re:Pyret: A new programming language from the creators of Ra... by jpolitz on Saturday November 09, 2013 @01:52PM (#6702641)
Syntax is tricky and contentious, and our team members do love our Schemes. Members of the Pyret team have actually done some research on the issue of parenthetical expressions in introductory programming, and seen that parens aren't necessarily the best:

http://cs.brown.edu/~sk/Publications/Papers/Published/mfk-va...

One issue is that it's too regular: since open-paren means so many different things (start of a "defun", start of a function application, start of an argument list in a "defun", start of a syntactic form like "cond" or "if", start of a clause of "code", the list goes on), a typo can easily and drastically change the kind of error message you get.

More closely matching syntactic forms to the type of behavior the expression has will hopefully let us improve error messages and grokkability of the difference between concepts. We're collecting data about common syntax errors and actively asking what we can do better in syntax design based on what we observe about Pyret's use.

Re:Pyret: A new programming language from the creators of Ra... by acjohnson55 on Sunday November 10, 2013 @03:47AM (#6705773)
I wish this could be upvoted so much more.

As someone who hasn't spent much of my time in Lisp world, most of my time when I come across some supposedly elegant implementation of an algorithm in Lisp, what my brain sees is impenetrable parenthesis soup. One incredible win of Python is the resemblance of the syntax to pseudocode, and how easy that has apparently been for new developers to absorb. I'm glad to see your team has taken that to heart for a language that's supposed to be pedagogical. And that is beautifully said about how a misplaced parenthesis can lead to all sorts of errors.

Error reporting, debugging, and documentation are in that "meta" tier of programming ergonomics that few people care to reason about, and yet they are oh so important to allowing actual human beings to learn programming languages and use them to produce rereadable and maintainable code.

Re:Pyret: A new programming language from the creators of Ra... by e12e on Saturday November 09, 2013 @07:17PM (#6704299)
Did you ever do any research/tests/courses with Smalltalk as the first language?
Re:Pyret: A new programming language from the creators of Ra... by skrishnamurthi on Saturday November 09, 2013 @11:29PM (#6705214)
Nope. Virtually nobody uses Smalltalk as the first language any longer anyway, to the best of my knowledge.
Re:Pyret: A new programming language from the creators of Ra... by e12e on Sunday November 10, 2013 @03:14AM (#6705720)
Well, I'm guessing not that many are using Pyret as a first language (yet) either... (Actually, I think a few people are still using Squeak to teach kids programming, so that's not even true)?

Anyway, I was more curious if you'd done such a study because

a) It's a very concise and consistent syntax, and

b) with all the great work that appears to go into Pharo Smalltalk it would seem to be viable option (again).

And yes, I do mean for computer science (not "just" programming):

http://www.lukas-renggli.ch/blog/petitparser-1 http://www.squeaksource.com/OMeta/

(This in addition to the nice design of Smalltalk-80 - and no, of course it isn't perfect -- is any language)

Re:Pyret: A new programming language from the creators of Ra... by skrishnamurthi on Sunday November 10, 2013 @09:00AM (#6706427)
Sorry, my point was not to get into a popularity pissing match. I do believe popularity and quality are largely unrelated.

What I meant is, since most people have stopped teaching with Smalltalk, it's really hard to do the kind of research I'm talking about! We had no trouble doing it for Racket because we were able to get lots of data and from it measure for statistical significance.

Re:Pyret: A new programming language from the creators of Ra... by e12e on Sunday November 10, 2013 @09:54AM (#6706576)
No worries, I understood that. I just thought you were in a great position to actually preform such a study, if you were willing to run it on a group of students :-)

I can certainly understand why you wouldn't "just try Smalltalk on a class or two", though!

Re:Pyret: A new programming language from the creators of Ra... by skrishnamurthi on Sunday November 10, 2013 @03:18PM (#6708237)
Yep, that's just not feasible. It would require me to first master Smalltalk, then find suitable textbook material, figure out how to adapt it to the material I'm teaching, etc. (Eg, where are the really good intermediate-level algorithms textbooks for Smalltalk?) The list goes on. So it's really just not feasible at all.