It is a great way to learn how a compiler works, but then again, in this day and age it seems less and less relevant to know that stuff, especially if you are going into a typical programming position.
I told my 2nd year CS students to create a programming language
51–60 of 67 posts
Re: I told my 2nd year CS students to create a programming language
#52The pipe dream part of me wants you to have them stick their results on github and work with each other, or start getting taught stuff by ... well, everyone.
My high-school comp-sci teacher is a large part of the reason why I can reason clearly about code, and he would push us in directions like this -- not as extreme, but similar in the "ok, here's an end goal that you can achieve by thinking about it and making combinations of what you know" sense.
I know a lot of programmers who don't grok compilers, even at a high level, and it's a shame -- a lot of things are a lot easier, and you open the doors to doing a lot more if you do.
Re: I told my 2nd year CS students to create a programming language
#53[0]I have taught courses where intro-level students write Scheme interpreters (in Scheme, in Java) and courses where students implement interpreters for higher-level languages, and courses (well, one so far) where they implement an actual compiler (for a subset of C).
Re: I told my 2nd year CS students to create a programming language
#54I wish I had a professor like you. When I asked why there was no compiler class, the answer I was given was: "compilers are a solved problem; there's no point in teaching them anymore." Maybe it's just my school though.
That's jaw-dropping really... every student should have to experience the horrors of the dragon book. *edit: I say that firmly tongue in cheek. The Dragon book is one of the most important pieces of CS literature ever written. It's a fine book, the subject matter is just difficult:)
This was at least 6 years ago though, so my memories are a little cloudy.
Re: I told my 2nd year CS students to create a programming language
#55I did something like this once many years ago for one of my wife's students, a precocious high-schooler who needed to be challenged beyond the elementary Fortran she was teaching at the vocational school. So I outlined the steps it would take to translate a toy language into a toy computer's instruction set, and reviewed it with the young man one afternoon at my office - an abbreviated compiler theory class with an e…
Re: I told my 2nd year CS students to create a programming language
#56It's a neat idea, but I really want to hear an experience report on the results . I don't want to throw cold water on this, because I want it to work and I think it might, but I have a fair amount of experience here[0] and can think of a number of reasons why it might go poorly as well. All we see in the OP is, "here's an idea that's cool (and it is) and I'm optimistic that it will work." [0]I have taught courses whe…
That's my goal, not teaching about compilers or language structure. About that they will learn empirically.
Re: I told my 2nd year CS students to create a programming language
#57Earlier quoted context omitted.
That's jaw-dropping really... every student should have to experience the horrors of the dragon book. *edit: I say that firmly tongue in cheek. The Dragon book is one of the most important pieces of CS literature ever written. It's a fine book, the subject matter is just difficult:)
Agreed. I'm taking a class right now with the dragon book (taught by Aho, actually - one of the authors of the book), and it's easily the best and most important CS class I've taken[1]. The main project for the class is to design a language and write a working compiler/interpreter for it - in all the years he's taught the class, apparently no group has failed to do this. The really tricky part is making a language th…
I don't think there's anything wrong with having Discrete Math, Data Structures or Computer Science Theory as pre-requisites for PLT or a compiler class. However, I doubt the necessity of OO Programming & Design and (so-called) Advanced Programming.
Re: I told my 2nd year CS students to create a programming language
#58Will you be able to show off the results? I'd be really pretty interested to see what some 2nd year comp-sci students come up with. The pipe dream part of me wants you to have them stick their results on github and work with each other, or start getting taught stuff by ... well, everyone. My high-school comp-sci teacher is a large part of the reason why I can reason clearly about code, and he would push us in directi…
About the github idea, I like it, but my students are not familiar with git yet. I will try to blog about their main ideas and language syntax in the future.
Re: I told my 2nd year CS students to create a programming language
#59Re: I told my 2nd year CS students to create a programming language
#60Cool! I had a (mandatory) course on compiler construction in my second year of CS as well. It was one of the toughest subjects, but it also made me understand and appreciate programming languages so much better. Like everyone, we tried to create a language without the annoyances found in many modern languages. Like everyone, we found that those annoyances are actually really hard to avoid. It was tons of fun :)