11 ms·
I've never understood the idea of a 'teaching' programming language. (Modulo examples like Logo and Scratch, which offer much more than a language as part of a
by gfodor 10y ago
I've never understood the idea of a 'teaching' programming language. (Modulo examples like Logo and Scratch, which offer much more than a language as part of a wider teaching/computing system.)
You spend all this time ramping up on a language, toolchain, library, etc, that you will eventually be unable to leverage beyond a certain point since it is not one used by everyday programmers. The delta in "quality learning" between a teaching language and a non-teaching language would have to be astronomically high, imho, to offset the difference in capability and the opportunity cost of learning an applicable skill to a wider problem set. Something that is just a slightly better Python or a slightly better Clojure for the purpose of illustrating computer science concepts seems like something that you'd be doing a disservice to students to teach, vs the "real thing" which they could carry for the rest of their lives into future projects ad infinitum.
- AstralStorm 10y agoYes, this should not be one of those training wheels, but a fully fledged solution. Even Pascal grew up into Object Pascal. Yes, it is still used in production.
- eastWestMath 10y agoI've had some experiences where it really helped. My supervisor uses a teaching stack based VM for his compilers class - it is slow as all hell but very simple, easy to get running, and it gives very good debugging info. Similarly, I can see the value in a simplified graphics API that let's you focus on the basic theory, or a simplified language with Hoare logic for writing loop invariants in an algorithms class.
- qwertyuiop924 10y agoThe idea is that the concepts of CS are universal, regardless of programming language. So instead of using a programming language that has been designed for real world use (carved with the footprints of a thousand language hackers, full of awkward inconsistencies, warts, and good-enough-for-nows), teach in a teaching language - a programming language that is very regular, with very simple semantics, not necessarily designed for speed. However, this doesn't exclude it from being a Real Language. Scheme is both a very popular teaching language (perhaps the prototypical teaching language, being used in SICP), and has seen actual use, with a dedicated community around the various implementations of the language. For a teaching language, there are a lot of things built atop it. Like, say, this site (PG's Arc runs atop an old version of Racket, from back before Racket diverged quite so much from Scheme, and was still called Scheme).
- swuecho 10y agoIf they are universal, what is wrong by using a reall word language? >"full of awkward inconsistencies, warts, and good-enough-for-nows" can not agree with 'full'. but Is there a teaching language better? I do not think so.
- Ericson2314 10y agoA teaching language doesn't have mounds of legacy code constraining its evolution.
- munificent 10y agoJust mounds of legacy documentation and teaching materials.
- qwertyuiop924 10y agoTrue, but the language that documentation and those materials teach is still a cleaner language than most.
- skrishnamurthi 10y agoLegacy teaching materials can be as much a curse as a boon. Look at all the people here who can't seem to wrap their heads around why some of the features of Pyret would be necessary for teaching programming. That's because their model of teaching programming is stuck in the 80s.
- qwertyuiop924 10y agoCompare CL to Scheme. One was designed for Real Work, the other for PL research and teaching. The difference is stark.
- skrishnamurthi 10y agoAnd yet Racket grew out of Scheme and is now every much a Real Work language as CL, while avoiding CL's warts. So your point is…?
- pgbovine 10y agoWhat about a 'teaching' OS/compiler/toolchain vs. the 'real' thing? e.g., a stripped-down OS kernel with minimal clean code optimized for teaching vs. throwing someone into Linux source. or a teaching-oriented compiler vs. wading into GCC/LLVM? Teaching languages/OSes/compilers/toolchains (if done well) lower the barrier to entry while providing a conceptual transition path to learning 'real' stuff later on the job. Plus, the 'real' thing that we may be teaching in school now may not even be relevant in 4 years in industry when students get out into the working world, and they will have to pick up new languages/toolchains/etc. constantly on the job anyways. There is definitely a good argument for authenticity, but also one for paring down extrinsic complexity to illustrate core computer science concepts. e.g., try explaining parsing using full-blown C++ as a case study -- that seems pretty daunting. But one of these teaching languages (if done well, of course) is much easier to write parsers for.
- zitterbewegung 10y agoIn my OS course we were taught using Linux.
- pgbovine 10y agoSure, there are advantages to both approaches, if done well. But I bet that diving into Linux first would make it really hard for beginners to get a deep grasp of core concepts; may be fine for more advanced learners. e.g., the scheduler is probably 10,000,000,000 lines of complexity when the core scheduling algorithm probably fits on one page of code.
- biot 10y agoIt does have one benefit: it forces the student to learn a second programming language sooner. I wouldn't want to work with someone who only knows the language they started out with, and likely still carries many bad habits from.
- jswrenn 10y agoLanguages such as C, Java, Python, and Rust are usually designed by experienced programmers in industry, for experienced programmers in industry. Pyret, on the other hand, is designed by computer science educators, for computer science education. This does not preclude Pyret from being a useful language for general-purpose programming; it just means that language design decisions are driven foremost by pedagogy. For example, Pyret trades performance for mathematical familiarity by using exact representations of rational numbers as its primary number type. Language like C, Java, Python, and Rust are all distinguished by different priorities that have guided their language design, too. I disagree with your characterization of any language as being the "real thing" because it privileges some languages above others, but let's run with it for a moment: A systems programmer might call Rust or C the "real thing", in contrast to Python, and perhaps they would even consider delta "quality performance". A sysadmin might call Python the "real thing" in contrast to C, and consider delta "quality productivity". Assuming learning one programming language does not preclude you from learning another, why shouldn't a computer science education call "Pyret" the "real thing" and be asked to justify the "delta learning" of moving to language that isn't designed with pedagogic interests in mind? (Disclosure: I am an occasional developer to Pyret, and this comment might not represent the views of the rest of the team. If skrishnamurthi or jpolitz replies, read their comment instead!)
- dom0 10y ago> Languages such as C, Java, Python, and Rust are usually designed by experienced programmers in industry, for experienced programmers in industry. Pyret, on the other hand, is designed by computer science educators, for computer science education. Honestly, looking at the examples on the Pyret main page makes me think that this isn't a good approach at all. I have been in software engineering for many years now and worked with quite some languages, yet I find the code practically in-understandable and the language looks very complex. So likely someone who "learned" using this language will have a lot of trouble actually working with real languages, assuming that he actually managed to learn this language as his first, which is rather unlikely I believe. I was also involved in CS education - in first semester programming courses. And the language is really the last problem there (C was used, I think the dept. is moving to Python for that course though). Especially eg. Python is a good language overall and is already widely used in CS education. In short, I don't see why the world needs this, and I actually think that using it would be actively harmful.
- jpolitz 10y agoThis paper (http://cs.brown.edu/~sk/Publications/Papers/Published/fffkf-drscheme-journal/ http://cs.brown.edu/~sk/Publications/Papers/Published/fffkf-...) linked from "Why Pyret" (http://www.pyret.org/pyret-code/ http://www.pyret.org/pyret-code/) is a long answer to "why teaching languages." It may also be useful to know that Pyret exists as part of a larger project and community. We're using Pyret to develop curricula for Bootstrap (http://www.bootstrapworld.org/ http://www.bootstrapworld.org/), which integrates computing curricula into existing middle and high school classes, like math and physics. Part of the idea is to integrate computing into these settings to reach students who may not self-select for computing. A lot of Pyret's design, like a dead simple animation framework (https://www.pyret.org/docs/latest/reactors.html#%28part._to-draw%29 https://www.pyret.org/docs/latest/reactors.html#%28part._to-...) and interfacing with real spreadsheets (https://github.com/brownplt/pyret-lang/wiki/TM028-Pyret-and-Google-Sheets-(Part-1) https://github.com/brownplt/pyret-lang/wiki/TM028-Pyret-and-...), supports these low-friction uses of computing in these curricula. Having these features and concepts baked into the language, supported by the IDE, and easily accessible goes a long way to building something that a non-CS teacher can pick up and use in an existing class.
- spdegabrielle 10y agoSo Pyret is attempting to help solve the very real problems engaging kids and supporting teachers through creating a toolchain and teaching materials based on real research. Is there a way to make a donation to this project?
- jpolitz 10y agoYes! You can contribute to the Bootstrap project directly: http://www.bootstrapworld.org/contribute/index.shtml http://www.bootstrapworld.org/contribute/index.shtml
- semi-extrinsic 10y agoI also belong to the skeptic crowd as far as fancy CS teaching languages are concerned. I think there's much greater value in a first language that's three things: dead simple, useful, and which lets you poke through the abstractions. A lot of us hackers here today cut our teeth on BASIC, even me as a 90's kid. I remember the joy at having automated away rote chemistry or physics homework, and in hindsight realise that writing a working BASIC program made me learn stuff better and deeper and quicker than the homework I avoided. I have a four-year-old now, and the other day she asked if I could count to a thousand million. I answered "Nope, but I'll show you Mr. Fortran, he can." Give kids a DO loop, some arrays and WRITE statements and they will conquer the world. For learning, it's hard to beat the simplicity of program count do i=1,1000000000 if i % 1000000 == 0 then write(*,*) i," Million" end if end do end program And I'm sorry to report, your examples don't convince me further of Pyret. (I'm a Python fan, BTW.) The docs you link for the "dead simple animation framework" assumes I understand templates; that's hardly dead simple. And while cloud integration is all cool for spreadsheets, if you did the same with Pandas in Python it would take no more lines of code, be no more complicated, but would start you on a tool that tons of people use for Real Work every day in a wide range of industries and sciences. Not just limited to interacting with half-baked Google Sheets data, you could read anything from HDF5 produced at CERN to SQL data from NASDAQ.
- analog31 10y agoThe first language that I learned was a "teaching" language: BASIC. That was in ~ 1981. A potential advantage at the time was that BASIC tended to be a completely self contained environment, meaning that you didn't have to assemble things like build tools and libraries. "Hello world" was one line of code, you entered it, and it ran. And at that time, just dealing with the tools -- typically on a mainframe -- was the first couple weeks of the typical introductory programming course. This is not entirely unusual, even today. I was curious about one of the toolchains for phone app development. For one particular tool, the tutorial for "Hello World" was many pages of instructions: Installing the tools, creating an empty application, setting its characteristics, adding code, building, etc. Even as an experienced programmer, I found it to be rather forbidding. Another possible reason for a teaching language might be to excite the interests of particular age or social groups. For instance, Logo was oriented towards making interesting graphics. Scratch eliminates the need to learn syntax, and has easy-to-program graphical output. On the other hand, some languages come pretty darn close to that old BASIC in terms of the ease of getting started, and one of those languages is Python. It seems to me that the sheer size of Python shouldn't be a deterrent to using it for teaching: Just ignore the advanced features at first.
- petre 10y agoBaisc is pretty cool. Very easy to learn and quite low level. It was the OS of older computers like the ZX Spectrum and then some later era handled calculators were programable in Basic. I used it later to write code for AVR microcontrolers. You can also program current Maximite computers or Duinomite clones using Basic. Lua and Python are comparable modern alternatives.
- skrishnamurthi 10y ago"Ignore" is easier said than done. Students make mistakes. They type the wrong character. They put something in thew wrong place. If you don't enforce your sub-language, you are effectively throwing them into the open, and they suffer. We've seen numerous examples of this, which is why DrRacket offers teaching languages that are subsets of the full language, with customized errors that match the student's vocabulary and level of understanding, etc.
- 10y ago
- agumonkey 10y agoI can't say for pyret per se. But learning a language can drown a newbie. The PLT guys under PLT scheme days and Racket even, had the notion of tiny interpreters that made you grow the set of possibilities of a languages, from arithmetic to booleans, then lexical scope, functions, lambdas etc etc. Each level allows you to think to the limit of that world. Only then you see where a new trait fits, how it relates to others. You don't just drown into heavy manuals right of the bat.
- deleted 10y ago[deleted]
- skrishnamurthi 10y agoLanguages take a while to develop. Pyret will develop over a long time. Over time, it will surely grow to be much more than what it is now. But while it's growing, we need to chart a growth path. That path is dictated by the constraints of teaching computer science to beginners and slightly-more-than-beginners. Every language you name and love and use had a growth path. This, ironically, includes Python, which also evolved from ABC: a teaching language.
- StreamBright 10y agoI think teaching LISP (Clojure) is an excellent option to demonstrate how easily you can solves complex problems by chopping up the problem to simple idempotent functions. Teaching students to use a complex OOP language with lots of gotchas and tricks is much harder in my opinion. Focusing on the concepts of data structures, recursion, time complexity is great for most newcomers to software.
- nemoniac 10y agoJust curious, are you still programming in your first language then?
- dragonwriter 10y ago> You spend all this time ramping up on a language, toolchain, library, etc, that you will eventually be unable to leverage beyond a certain point since it is not one used by everyday programmers. Teaching languages that are even modestly successful in that role tend to achieve significant use outside of teaching, as well, so that tends not to be true. Lots of languages that end up having broad general use are created with a minimum ore specific motivating use, and teaching is no less legitimate than any other motivating use. Pascal, for instance, was a teaching language, and it for quite a while had enormous industrial uptake.