What would you recommend as a first programming language for students, and why?
I’ll go first. TypeScript: it teaches you the best parts of JS and about types
If you’re into backend: Go. Safe, types, good community and fast enough for most things
@alcinnz @andrioid sorry for pushing Apple stuff here, but #Swift. It's just a very nice language that feels very lightweight and scripting-like, yet uses static typing and compiles to native code (LLVM; but it's not as efficient as #Rust or C due to pervasive boxing). It has a REPL and some very nice interactive IDE support (Swift Playgrounds), which also lets you do basic UI stuff in the sidebar, right alongside the playground.
@alcinnz @andrioid last note, Swift has nice support for FFI, and it does some magic to make it automatic. I bet there are *tons* of corner cases, but basically you can just "import Darwin"/"import Glibc" and call C functions directly, as if they were Swift functions, and you can even pass Swift's native strings where `char `* is expected and so on.
@bugaevc @alcinnz I think Swift looks really interesting. However, I need languages with such strong commercial backing to become community projects before I can allow myself to use them.
For example, when Google's Go was only a language for the App Engine it had absolutely no appeal to me. But now 👍
@andrioid @alcinnz mind, I'm not saying you should write your personal projects in Swift, I'm saying it's good for teaching beginners to code. After you get familiar with a language (and programming in general), it's much easier to learn a different language you'd need for an actual serious project, whether that's JavaScript, Java, Python, etc.
@andrioid @alcinnz they *can* build something awesome with Swift, like an iOS or macOS app. It may not be what *you* want to do, and not what *they* end up doing in their career as developers, but it's a great way of learning. Swift being so high-level, native to Cocoa, and integrated with the rest of the system (e.g. installed with Xcode) makes it very well positioned for learning programming by building real things, because it's so easy to go from print("Hello World") to a simple app.
@alcinnz @andrioid Swift itself is open source & Apple even provides packages for some old Ubuntu releases. I've heard of Swift flatpaks that you can just install on your distro of choice. So you get the REPL + your favorite text editor, but lose all things Playgrounds & Cocoa. And that voids most of Swift appeal, so you'd have to use macOS/iOS to teach beginners Swift, yeah, that's a huge downside.
@alcinnz @andrioid So you can code the game of 2048 or something and play it right there. It is "completely native" to Cocoa, Apple's framework stack, and it's a serious language parts of macOS and iOS are written in (e.g. the Dock).
Swift Playgrounds is also available as an iPad app, and it has some additional niceties for beginners, like a playful and friendly introduction to basic syntax and to programming in general.