5 ms·
What do you think is a good first language? I've seen a lot of people say that Python is a good first language, but I think Javascript is just as approachable
by wildrhythms 10y ago
What do you think is a good first language?
I've seen a lot of people say that Python is a good first language, but I think Javascript is just as approachable as Python.
- SOLAR_FIELDS 10y agoFor however "forgiving" JavaScript syntax is, I still believe that the syntax is a bit intimidating for beginners (curly braces). Python has it's own magical syntax idioms, mostly in regards to array slicing and list comprehension, but even that seems a bit less intimidating than JS (I say this as someone who learned to code after being intimidated by it for several years)
- lol768 10y agoIt's a hard question to definitively answer. I think Python has a lot going for it. It doesn't do dumb things when testing for equality, it's predictable. At the same time, it's perhaps not as easy to write quick scripts if you don't know OOP (example: having to use the global keyword in helper functions). There's also the work required to get it set-up. I learnt with Java. It gave me an understanding of OOP but in it did not give me a good understanding of lower level details and unfortunately I've not properly learnt to write code in C at university. In hindsight I'd have been better off starting with C. It would've been more difficult for sure, but I'd have understood what actually going on.
- u801e 10y ago> At the same time, it's perhaps not as easy to write quick scripts if you don't know OOP (example: having to use the global keyword in helper function Your example has nothing to do with OOP. It's simply how python handles variable scope outside of a class.
- lacampbell 10y agoNot the person you asked, but I would say one of Scheme, Lua, or C. You want a small language with not a lot of extra bells and whistles. My first year CS classes were in C# using visual studio, and at the time I hated it. I had never coded before and I was drowning in complexity that had nothing to do with computer science fundamentals. It was only until I did some stuff with discrete maths that my thoughts turned to programming again - possibly because discrete maths was not taught in an "industry focused" way, and that freed up my mind to wander. Focusing on stuff that recruiters want is a cancer in computer science education.
- nobleach 10y agoActually, all three of those sound like a fantastic mix. I was taught Turbo Pascal at first, and then my college classes were in Java (mostly). So it was more concept based. But each of those languages that you've specified, highlight different facets. (Interpreted vs dynamic. Functional vs imperative - maybe toss in some C# for OOP) And I totally agree. CS grads should be DECIDING (not at first) what languages are to be used at their shiny jobs... Vocational schools are for teaching the languages that are "in demand".
- lolive 10y agoThe most important is to learn object composition & strong type systems. So I would say Java 8 (in an IDE, of course).
- goatlover 10y agoWhy should a beginning programming class have to include learning an IDE?
- lolive 10y agoSo you get a safe refactor feature for free. So you don't get afraid of refactoring. So you do refactor. So you get used to that exercise. And eventually you refactor in your head before typing. Plus you get types hints for free, and safe auto completion too.
- mrmondo 10y agoPython, then as a second move down to C.
- madhadron 10y agoI have yet to see anything superior to the TeachPack languages in PLT Racket, though a friend of mine is building a similar incremental system of instruction in Python.
- rakoo 10y agoAs a fan myself, I'd go with Go. It's been designed to have as little magic as possible, which is a good thing for huge teams working on huge codebases (its primary target) but also turns out to be a good point for learning a language. It's got all the niceties that make high-level programming easy and fun (GC, types, instantaneous compiler, integrated testing and benchmarking frameworks). Many Go developers could tell you about how coding small programs in python vs Go turns out to be similar from a developer experience point of view. I don't see any class-level task that can't be solved with the standard library, but if something else is needed, adding external dependencies is extremely easy. It's also going to teach students about the differences between concurrency and parallelism, notions that are desperately needed as the hardware has been multi-core for so long now but still hasn't been exploited as much as it should have. Of course not everything is perfect, I can see a few issues: * Go favors composition over inheritance to the point that the latter just can't be done. While I believe this to be the correct choice, it will hinder students' capacity to switch to other languages that favor inheritance, i.e most of them * Go remains a "backend" language. There is no easy way to do any fancy graphical stuff, let alone work in the browser. Those 2 domains both have very specific demands that I feel are worth learning early * There is no REPL for quick validations of intuitions or ideas. I do use play.golang.org for this, but it's far from being as smooth as running a python interpreter or dropping into the browser for a simple test