When is The Scheme Language Taught in CS?

<p>I'm starting my first programming class in January, so I thought I should look at some programming tutorials on Youtube. I came across a video that was a tutorial for the Scheme language. I was understanding it all the way to the point where it was explaining how to do recursive programming for Scheme. I got lost. All of the parenthesis confused me. </p>

<p>My question is will learning C and C++ make it easier for me to understand Scheme recursive programming?</p>

<p>When is Scheme taught in CS? Is it in the first courses of a CS major?</p>

<p>Scheme is taught in CS at a small handful of schools. When it is present in a curriculum, it is almost always in the first year. This is because there is an excellent textbook (Structure and Interpretation of Computer Programs) that many feel gives an important introduction to CS’s theoretical aspects, before students learn a language structured around real-world needs like Java.</p>

<p>Scheme is a functional language, which gives it a number of elegant properties. However, because of this, loops in Scheme are done through recursion, which is confusing to new CS students.</p>

<p>There was a shift around 2005 towards teaching Python instead, so you don’t see it as much in schools nowadays.</p>

<p>Yeah, the parenthesis can be confusing. Consider you have a function “f” that adds two variables together. In math you would call it f(var1, var2). In scheme you call (f var1 var2).</p>

<p>The “+” function actually does this… and the parenthesis nest. So if you want the value</p>

<p>(B + (C - D)) * E</p>

<p>you call</p>

<p>(* (+ B (- C D)) E)</p>

<p>You can make sense of it by evaluating the inner parenthesis first, and working outwards. It’s in prefix notation so the first symbol inside a set of parenthesis is always the function you will apply to the rest of the symbols.</p>

<p>Learning ANY programming language will make it easier to learn ANY second language. Even if they’re quite different, knowing one will make learning the second easier. The basic principles of programming are quite language independent.</p>

<p>There’s a good chance you’ll never learn Scheme in a class. C++, Java, and Python are a lot more common. However, you could always learn it on your own if you so desired.</p>

<p>In some schools it is taught as a first programming language, and it’s a pretty good one to start with at that. Otherwise, You may learn it in a class on programming languages or compiler design. C or C++ won’t help you much with Scheme because there is a lot that you have to unlearn from C or C++ to program in Scheme. However, Scheme will help you a lot with C, C++ and Java because if you get used to the functional programming concepts from Scheme, you can write really concise code in most other languages.</p>

<p>I would recommend learning Lisp if you have spare time, just because it’s a really cool language, but C++ won’t do anything special to prepare you for it. Few companies use Lisp because it is generally hard to read.</p>

<p>What about functional programming?</p>

<p>Is that towards the end of most CS curriculums?</p>

<p>If you don’t learn functional programming in your intro course, you will probably never learn it unless you take a programming languages course.</p>

<p>PL researchers love Scheme/Lisp/Haskell. They see minor use in niche applications in industry, but in general they’re just great to learn— they make you think in a different way. </p>

<p>SICP is a great book if you ever find the time.</p>