4 ms·
Python was heavily based on ABC, a language which targeted new programers and made syntax choices based on user testing: http://python-history.blogspot.ca/20
by spenrose 12y ago
Python was heavily based on ABC, a language which targeted new programers and made syntax choices based on user testing:
http://python-history.blogspot.ca/2009/02/early-language-design-and-development.html
It says a lot about our understanding of our field that new languages generally do not formally test their syntaxes (and other "mental model" features) for usability.
- spdy 12y agoAnd this exactly what everyone needs in the beginning. Simple and clear syntax where you are able to produce results in a short amount of time to keep you interested. I just remembered some people i learned with who struggled along time to get behind the concept of pointers and how to use them when they thought us c/c++ as an intro language to programming.
- eru 12y agoC is not great but bearable as an intro language, mostly because K&R is a good textbook and the language is small. C++ would be absolutely horrible. Is anyone doing this?
- andrewflnr 12y agoYes. At Pasadena City College, at least, most CS classes are taught in C++. AFAIK the creation of even one Python class is still mired in political nonsense.
- pjmlp 12y agoYes, quite a few Portuguese universities.
- deleted 12y ago[deleted]
- brudgers 12y agoIf programming language selection for introductory university courses was based on pedagogical research on introductory computer science courses, I suspect Scheme would be nearly universal given its roots and nearly forty year track record. But that's not how languages have typically been selected for 15 years or so. The direct vocational skills argument has held much more sway.
- prawks 12y agoI suspect that's how it came to be chosen at my alma mater. Lots of theory-heavy professors. Was a great experience learning in Scheme, btw.
- cfqycwz 12y agoDoes anybody here know of any resources where I might read up on best practices in CS pedagogy? I'm very interested in helping to reform my university's intro-level CS program.
- brudgers 12y agoBest practices differ from context to context. MIT switched from Scheme to Python because a large segment of students in 6.001 were not necessarily going into computer science and were there as because of a common core curriculum. Does it really make sense to teach such people to write language interpreters in an introductory course? But every place isn't MIT, nor is every course a common core requirement for a college or department with diverse majors. Does a civil engineering student really need to implement lazy evaluation? Felleisen's paper and subsequent book as well as the work of the PLT group show the current state of Scheme as a pedagogical language. http://www.cs.brown.edu/~sk/Publications/Papers/Published/fffk-htdp-vs-sicp-journal/paper.pdf http://www.cs.brown.edu/~sk/Publications/Papers/Published/ff... http://www.ccs.neu.edu/home/matthias/HtDP2e/ http://www.ccs.neu.edu/home/matthias/HtDP2e/ http://racket-lang.org/learning.html http://racket-lang.org/learning.html
- hga 12y ago"Best practices differ from context to context. MIT switched from Scheme to Python because a large segment of students in 6.001 were not necessarily going into computer science..." Nope, MIT has an introductory computing course that logically goes before 6.001-4 or the new 6.01-2. For a long while they didn't have one due to resource constraints, they dropped this service course about the time 6.001-4 was developed, but other departments had their own more domain specific introductory courses (see below for more details). 6.001 was canned and Scheme completely purged from the undergraduate curriculum for political reasons, after the Department, and likely School of Engineering and the Institute itself panicked when the dot.com bust more than halved enrollment, after it had been 40% of the undergraduate class for decades. Oh, yeah, after the Institute had also blown a quarter billion dollars in a not very functional new building for the EECS research labs. "... and were there as because of a common core curriculum." That ignores that MIT's EECS department has for a very long time insisted that EE majors have serious programming experience, and CS majors the same for hardware. 6.001 programming, 6.002-3 hardware, 6.004 both, all majors had to take all 4. This was true but less coherent in the '70s before that common core was developed, and it's still true with 6.01-2 which combine both. MIT's EECS department started as an EE department, this is not an unusual approach for such, vs. ones that started from the math side or otherwise independent of EE. If you want pure CS, you shouldn't go to MIT or U.C. Berkeley, but to CMU or Standford (or so I gather about the latter three). "Does it really make sense to teach such people to write language interpreters in an introductory course?" Yes, if you want them to really understand what it's all about. Since it's Lisp, that's also much less intense than it normally is, essentially all the colossal parsing messes with other language families can be skipped thanks to its S-expression syntax, and you can focus on the very basics. As for e.g. Civil Engineers, MIT's Civil and Environmental Engineering department has its own 1.000 and 1.001 courses for its type of computing, and as I remember that was true way back when 6.001-4 was developed. In the late '70s 4 or so engineering departments got together and got VAX11/780, which they used for their own education etc. purposes, while EECS later procured first a DECSYSTEM-2060 (which had a CPU twice as fast, but a max of 1 MiB address space), then/in addition HP 68000 workstations (eventually Project Athena took over this sort of duty, I think). Finally, whatever the pedagogical merits of Scheme and/or SICP/6.001, Python is now winning due to fashion rather than merit (although it does have some merits compared to other languages that could and are often used like Java).
- Daishiman 12y agoA lot of the recent Rust syntax changes are based on applying proposed changes to the Servo codebase and analyzing the changes subjectively across the entire sample. In cases where new semantics help with inference of types or annotations, the metric becomes quite objective.
- pmontra 12y agoThank you for that link. I finally understood why Guido added the colon before an indented block (second paragraph). It's not needed by the parser, it's only to make it easy for programmers to understand that a block is about to start. Actually: "after early user testing without the colon, it was discovered that the meaning of the indentation was unclear to beginners". So it's aimed to beginner programmers. That's why Guido inflicted that useless and silly looking colon to all of us. How about making it optional in future?
- gaius 12y agoBut there is some weird stuff in Python syntax. Like, why do you create a dict with {} but access it with []? It always felt to me like an organic language, not one that was planned with consistency in mind (which is fine, of course).
- maxerickson 12y agoIt's also used for creating lists, but [] is syntax for retrieving a value from a container: https://docs.python.org/2/reference/datamodel.html#emulating-container-types https://docs.python.org/2/reference/datamodel.html#emulating... Or, the earliest I could quickly find: https://docs.python.org/release/1.5/ref/ref-5.html#HEADING5-98 https://docs.python.org/release/1.5/ref/ref-5.html#HEADING5-... The access pattern is probably the right aspect to make consistent (at least in the context of duck typing). If the access isn't generalized across various types they might as well use named methods. edit: I corrected the anchor in the second link.
- lmm 12y agoDeclaration doesn't reflect usage, it's not a helpful principle in general. You create tuples with () but access them with [], and the fact that [a, b, c] is a list has very little to do with the fact that you use [] to index into it. The {} syntax for dictionary literals is reasonably common; Ruby's looks fairly similar, and Javascript uses almost exactly the same syntax, which many people will be familiar with thanks to JSON. Are there any other popular syntices for dict literals?