Hacker News new | past | comments | ask | show | jobs | submit login

I love the "reimplement the standard library" approach to learning a programming language.

When I learned C and Unix, the instructor had us reimplement libs like string.h and stdio.h, command line tools like date, ls and cut and then build tools like make.

It made me a much better C programmer.




C is a language I'd like to see make a reappearance in CS curricula. It's great that most programmers today don't have to deal with memory management and pointers, but I think a CS degree should leave the student with a basic grasp of the full stack of programming paradigms.

I think a nice approach would be to start off with a high-level, functional language like Haskell or Scheme, and then move down the ladder of abstraction in subsequent courses, culminating in a hardcore C (or maybe even assembly) course.


This is exactly what my school did. The first CS class was in Scheme, based on SICP. The next one was about data structures and based on Java. The last one was about computer architecture and used C followed by MIPS followed by designing a simple CPU with logic gates.

Overall, it's a pretty good system. The middle Java class was completely worthless and a big waste of time though; in hindsight, I should have skipped it. Also, while we learned a bunch of cool things in the SICP class, every single other class except for programming languages/compilers completely ignored it. Most retaught some of the same concepts, but poorly.

Also, apart from SICP, there aren't any undergraduate classes doing functional programming! What's up with that?

At least at my university, there's plenty of C and C++--even in places where it blatantly doesn't fit, like the other version of the compilers class. And far, far too much Python. And too little functional programming. Ah well, c'est la vie.

I would love a compilers course taught in ML (maybe OCaml?), and it's a possibility, but not before I graduate :(.


I graduated from the University of Chicago, and they have a handful of undergrad classes using functional languages. The intro comp sci courses were using Haskell for the honors class, and Racket for the non-honors version when I took it. The compilers course there is taught using ML, though the fact that UChicago has several faculty who work on the development and maintenance of Standard ML may have something to do with this.


Where are you studying? My undergrad (City College of New York) was mostly C++/Java with the exception of the PL course, which used Scheme. We also had an elective that taught x86 assembly.

I had to discover and learn Haskell on my own :)


I'm at Berkeley.

I also had to find Haskell on my own, but I think it worked out reasonably well in the end. The type theory/semantics class did use a bit of OCaml, but it took a while to get to it.

Also, I should add that--largely due to my own preferences--I've taken a disproportionate number of classes that do not really focus on programming at all. The aforementioned type theory/semantics course only had a token amount of programming, and three other CS classes had no programming at all. They were also some of the coolest and most fun. (After all, I can do programming on my well enough; theory is a bit harder.)


The C Programming Language takes a similar approach to exposition, and I think that's one of the reasons it's considered such a classic. It was certainly eye-opening for me when I first read it.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: