3 ms·
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 parenthe
by jpolitz 13y ago
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-val-grow-tree-expr-integ-fp/ 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.
- e12e 13y agoDid you ever do any research/tests/courses with Smalltalk as the first language?
- skrishnamurthi 13y agoNope. Virtually nobody uses Smalltalk as the first language any longer anyway, to the best of my knowledge.
- e12e 13y agoWell, 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.lukas-renggli.ch/blog/petitparser-1 http://www.squeaksource.com/OMeta/ 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)
- skrishnamurthi 13y agoSorry, 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.
- e12e 13y agoNo 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!
- skrishnamurthi 13y agoYep, 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.
- acjohnson55 13y agoI 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.