9 ms·
I think there were two main reasons: choosing a popular language (JS and python happen to be among the most popular, accessible languages) and pedagogical simpl
by ksml 5y ago
I think there were two main reasons: choosing a popular language (JS and python happen to be among the most popular, accessible languages) and pedagogical simplicity (it's nice to avoid burdening beginners with extra syntax when they're already struggling to learn other things). Some unscientific evaluation showed that students picked up static types just fine in our second programming class (which is in C++)
Personally, I think we should be teaching static types and I pushed for Typescript, but it didn't happen.
- bachmeier 5y ago> it's nice to avoid burdening beginners with extra syntax when they're already struggling to learn other things As someone that teaches college students to program (not in a CS department) that statement is correct but doesn't provide the full picture. It's good to get rid of the extra syntax if and only if you don't need it - and that means you're intentionally limiting what you're teaching them.
- extra88 5y ago> you're intentionally limiting what you're teaching them Yes, that’s the point. It’s an introductory class, choices have to be made about what to teach when.
- bachmeier 5y agoWell, of course, but the point is that avoiding syntax is not a great criterion for defining the fundamentals of programming. A couple orders of magnitude more important is to decide what concepts are useful for beginning programmers to know.
- afiori 5y agoI took it as "removing syntax left more space for other stuff"
- cogman10 5y agoAlways an option to push for something like mypy. That'd at least give students exposure to types (even if they don't have to write them)
- jefftk 5y ago> I think we should be teaching static types and I pushed for Typescript Another option would be to introduce Python types: def square(x: int) -> int: return x*x http://mypy-lang.org/examples.html http://mypy-lang.org/examples.html
- benrbray 5y agoIs there something like DefinitelyTyped for Python? TypeScript only became useful once the ecosystem reached a critical mass of type definitions available for popular libraries. At the moment the Python community seems pretty anti-static-types, and the core scientific libraries (numpy, matplotlib, pytorch) don't export type signatures. Language server / intellisense support for type inference also has a long way to go.
- vorticalbox 5y agoNot that I am aware of. You can create you own types like what has happened with boto3 [1] I would assume as types become used more a definitely typed type project will happen on pypi. [1] https://pypi.org/project/boto3-type-annotations/ https://pypi.org/project/boto3-type-annotations/
- kaba0 5y agoI am sure I’m absolutely nowhere near your knowledge and expertise, but please bear with me sharing my opinion :) I think Java fits better as an introductory language — it is similarly popular as JS and python, and while I’m sure static typing can be picked up easily, I think fighting the compiler for a likely-correct program in the end is a better alternative than understanding why the program failed with this given input and not with another — so my not-backed-up-by-teaching opinion is that dynamic languages are not necessarily a great fit. It also features the basic OOP concepts, and modern java can showcase plenty of FP ones as well. On the other hand, going lower level is similarly detrimental, I’ve taken a class where C was used, and that way you get cryptic runtime errors as well, while memory management is not that hard to pick up later on.
- bradlys 5y agoIntro classes don’t need to overburden the student. The biggest hurdle for students is thinking like a computer. You start introducing all these extra things to just get going and it becomes even more difficult. Explaining to students what public static void main means is pretty annoying and seeing cryptic syntax littered everywhere does not help students when they’re first learning. Dynamic languages make much more sense to beginners because the idea of what a variable represents is more abstract to them than tangible to you. To them, they don’t see the value of types because they’re not going to be building large programs where that is going to matter. They know what their functions return and take in, because they probably only have one or two. Performance and compiling is also not as much of a concern, etc...
- kaba0 5y agoI agree with you on the overburden part, but not on the dynamic lang part. My very minimal experience is that the hardest thing to get right as a beginner (or even as an experienced developer) is to be able to follow the flow of your code (Maybe introductory courses should employ the debugger?), and the exact state it has at a given point, eg. at an exception. Restricting the valid states imo helps understanding. As well as not having to debug at all at first, but the compiler notifying what is wrong immediately.
- bruce343434 5y agoI started programming in Lua which is dynamically typed. It allowed me to experience why a type system would be nice. I'm sure if I had started with a typed language, I would have written it off as antiquated and unnecessary.