3 ms·
I also think Python is a great teaching language, but I think it brings some confusing concepts to the table. Whitespace nesting is one of my favorite things in
by ddagradi 15y ago
I also think Python is a great teaching language, but I think it brings some confusing concepts to the table. Whitespace nesting is one of my favorite things in the world, but is a bit of a demanding idea to add for someone with no experience in code.
It remains unimportant, however, as the goal is to teach children foundational skills, not specific languages.
- nyellin 15y agoThe language makes a difference. I've seen many try to pick up programming and stop because they deem their first language too hard. I agree, however, that foundational skills matter a lot. That's why statically typed languages might be better for learning to program, because they lay a foundation for understanding types.
- roestava 15y agoI recall Pascal and C when I was starting out and how tough it was to grasp them. But I also had trouble with Perl when I first encountered it. I got quite a bit done with some languages based on basic and with Delphi, when I could finally understand some of the errors I used to get with Pascal. Based on my experience, I'd say that errors you get help you with learning about languages that make those errors evident. I learned about recursion before I learned about getting the compilers happy, for instance. It's funny though that I can count Python as one of the languages that I've barely used and learned simply because I was never too fond of it. Anyways. I think Ruby is a fine language as it resembles basic and doesn't demand ";" and parentheses, and it also has great OO support which helps with the documentation and even IDE support. With name completion, for example. Methods in Ruby are very straightforward and control-flow structures are plenty capable in Ruby. Not having to declare variables can also help, and Ruby does report some errors quite handily. Cheers.
- jnbiche 15y agoI would argue that whitespace provides a visual cue to code organization that could prove critical to children learning to program. To provide an (adult) example of what a little whitespace and DRY can bring about, I'll describe my struggles to learn to program fluently. From 1998 until 2010, I did web design on and off, even working as a professional web designer for a few years. Although I was good at HTML, CSS, and design, I came from a non-CS background and struggled to learn Javascript beyond simple cutting and pasting of scripts and a little jquery. I eventually learned enough PHP to begin considering myself a programmer (yes, cue the laughter), but it wasn't until I started to learn Python a few years ago that I experienced a breakthrough. Now I'm fluent in Python. After I was comfortable with Python, I went back to Javascript, via Coffeescript initially, and with the background Python provided, was able to grasp the fundamentals of Javascript to the point where I can now actually create full programs in JS. Since then, I've been able to pick up some C and am making excellent progress with Haskell. I attribute this programming epiphany to Python, and particularly to the visual cues that whitespace provides (along with "explicit is better than implicit"). Whitespace not only provides key visual cues to code structure, it also forces you to organize your code coherently before you can run it. I've not learned Ruby, but I like what I've seen of it a lot. I'd love to have the opportunity to use it one day. However, I firmly believe that for some people at least -- including children learning to program -- semantic whitespace provides critical visual and organizational pedagogical support. For that reason, I think that Python, or even Coffeescript, would be a better first language for child (and adult) learners.
- ddagradi 15y agoI've definitely gone back and forth with that, and felt the exact same way when I learned Python. And I agree - semantic whitespace is a really great feature that makes Python simpler in a lot of ways. Where I start to like it less is when I think about how much structure it imposes on the code before you can even write a line - it has the potential to remove some degree of experimentation. And how easy, for a new user, it could be to get it just wrong enough to be problematic. Don't count me as a hater though. I would love to write Ruby with semantic whitespace - HAML already gets me halfway there!