My first CS class is using Scheme...

Ichigo

Platinum Member
Sep 1, 2005
2,158
0
0
I went through the first chapter of the textbook and tried some stuff out, but that's it?

Is it a good learning language?
 

tfinch2

Lifer
Feb 3, 2004
22,114
1
0
My first CS college class was taught in Scheme. There were a lot of guys that thought they were uber leet in VB, but ended up dropping the class because they couldn't get their head around recursion. I don't necessarily think it's a good first language, but I think that Scheme/Lisp is fun.
 

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
I learned Scheme as part of my CS classeswork - its a great language - teaches you to understand about recursion and functional programming.
Agree with tfinch though - not a great first language. It doesn't really prepare you for any real world things you will encounter. I didn't have it taught to me until Junior year and that was in more of a theory class.
 

techfuzz

Diamond Member
Feb 11, 2001
3,107
0
76
It was used in one class I took my sophomore year. IMO, Scheme isn't useful for anything except for teaching purposes and research papers. I had a really hard time understanding how to use it from a logic standpoint. The semantics of the language were quick and easy to learn IIRC.

At the time, Pascal, C, and C++ were the other predominant languages being used for teaching and I found them much easier to learn. I have since taught myself probably another dozen or so languages on my own, but you've got to start somewhere.

techfuzz
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
My intro college work was all done in Java, but once you got past those 2 classes everything was a mix of C/Java/various assemblies/Haskell(far better then Scheme IMO ;)).

I don't think Scheme or Haskell is the best language to start with at all though. It's definitely something someone needs to learn and needs to be exposed to, but not as an intro class!
 

theknight571

Platinum Member
Mar 23, 2001
2,896
2
81
I thought everyone started with Apple Basic on a IIe... then graduated to Turbo Pascal on the PC... then to C and C++. :p

My favorite language we used in college was Ada... The vast majority of classes were Pascal though... with some C/C++ near the end of my degree program.

I've never heard of Scheme... lol.
 

Tencntraze

Senior member
Aug 7, 2006
570
0
0
The very first class in my college's CS track used Scheme. I guess it was a little hard at first, but it really is a great language to wrap your head around all those concepts.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Originally posted by: presidentender
I think it's a great idea, because it will quickly weed out the non-programmers.

My school used a Logic class as it's primary weed out class. First class you took as a CS student was Philosophy 313k - Introduction to Logic. Very few people who passed that class had trouble with any of the programming classes, whereas people who did really well in the programming classes still most likely would fail the logic class.
 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
I think Scheme's a great first language if you truly are coming in knowing nothing. That's because the syntax is so simple that you don't have to spend much time teaching it initially. If you start with something like C or Java, you immediately have to deal with the quirks of the syntax.

However, if you already have programming experience in a mainstream language, learning Scheme can be very strange just because it is so different from mainstream languages.
 

jman19

Lifer
Nov 3, 2000
11,225
664
126
Originally posted by: Drakkon
I learned Scheme as part of my CS classeswork - its a great language - teaches you to understand about recursion and functional programming.
Agree with tfinch though - not a great first language. It doesn't really prepare you for any real world things you will encounter. I didn't have it taught to me until Junior year and that was in more of a theory class.

Sounds like a good reason to teach it freshman year. You aren't going to do many "real world" things then anyway if you haven't been self taught at that point. Besides, it's a fairly small and simple language - you can spend your time understanding concepts rather than syntax and libraries.
 

spamsk8r

Golden Member
Jul 11, 2001
1,787
0
76
Originally posted by: Tencntraze
The very first class in my college's CS track used Scheme. I guess it was a little hard at first, but it really is a great language to wrap your head around all those concepts.

QFT. My first class was in Scheme, and at the time I did not like it and did not get it. But now, with 7 years of programming under my belt, I think it's a great language, and I'm glad that I learned it, because it is so different (and powerful, it turns out). Lisp is one of the oldest, most powerful languages ever created, and Scheme is simply a dialect of it. John McCarthy is a genius.
 

degibson

Golden Member
Mar 21, 2008
1,389
0
0
Scheme is a fine thing to learn at University... eventually. Its not all that useful in a lot of situations (like all languages), but it does hammer home some fundamental 'elegant' programming practices (which also aren't that useful... heh). In a way, its too bad you're forced to learn it first, because imperative programming will seem quite alien to you when its dumped on you in subsequent courses.
 

lousydood

Member
Aug 1, 2005
158
0
0
Originally posted by: degibson
In a way, its too bad you're forced to learn it first, because imperative programming will seem quite alien to you when its dumped on you in subsequent courses.

That's the point of teaching it first. Get the good habits in first, make the bad habits feel "wrong."
 
Sep 29, 2004
18,656
67
91
I had to learn scheme. It is a very good language for educational use. Learn it and embrace it and love the things it enforces.

You need to LEARN object oriented programming. If you can only learn Java(for example), you are doomed.
 

Dravic

Senior member
May 18, 2000
892
0
76
I come from the Pascal as first Univ language tribe... then moved to C/C++, perl, python. Taught myself BASIC on my ADAM computer at own around ~11.

Haskell and Scheme are taught for the logic not the functionality alone. linked list and recursion are very important concepts to have as you begin using advanced programming techniques.

Its usualy the kind of class you find in the first two years as it weeds out those who should move on to MIS, before its too late to switch majors.

My old roomate was this way. I could get him though softmore year, but he just wasn't made for 300+ level CS and Math classes.
 
Nov 7, 2000
16,403
3
81
like a lot of your college education, knowing scheme will never be useful. however, learning it bends your brain in ways other languages don't, so its a useful in that regard. wrapping your head around recursion will pay dividends later on, even in non-functional languages. i liked it as a weed-out class.
 

spamsk8r

Golden Member
Jul 11, 2001
1,787
0
76
Originally posted by: IHateMyJob2004
I had to learn scheme. It is a very good language for educational use. Learn it and embrace it and love the things it enforces.

You need to LEARN object oriented programming. If you can only learn Java(for example), you are doomed.

Java is an object oriented language (okay, it's no smalltalk, but what really is (and don't say squeak)). Did you mean functional programming?
 

Dravic

Senior member
May 18, 2000
892
0
76
Java is an object oriented language (okay, it's no smalltalk, but what really is (and don't say squeak)). Did you mean functional programming?



I have a co-worker who is just learning programming(well advanced programming) and he still mixes up OOP and functional programming. As he learns to modularize his code and increase the functional programming and layout(includes... etc), he keeps saying"I love OO coding" and "I finaly understanging OO coding".. eh no you not.

 

degibson

Golden Member
Mar 21, 2008
1,389
0
0
Originally posted by: lousydood
Originally posted by: degibson
In a way, its too bad you're forced to learn it first, because imperative programming will seem quite alien to you when its dumped on you in subsequent courses.

That's the point of teaching it first. Get the good habits in first, make the bad habits feel "wrong."

I don't know what habits you refer to, probably because I know zip about scheme. There's very little about recursion that's good. Bad performance, bad readability, bad intuition. Prettiness != Usefulness.

I think functional languages do a bad job of preparing would-be programmers for the eventual horrors they may/will face with imperative languages... lets face it -- the von-neumann model is imperative.
 

lousydood

Member
Aug 1, 2005
158
0
0
Originally posted by: degibson
Originally posted by: lousydood
Originally posted by: degibson
In a way, its too bad you're forced to learn it first, because imperative programming will seem quite alien to you when its dumped on you in subsequent courses.

That's the point of teaching it first. Get the good habits in first, make the bad habits feel "wrong."

I don't know what habits you refer to, probably because I know zip about scheme. There's very little about recursion that's good. Bad performance, bad readability, bad intuition. Prettiness != Usefulness.

This is the kind of attitude that I'm talking about. The one that views "recursion" as just some kind of weird alternative to iteration. Sadly, many professors teach in a way to leave this impression. Somewhere, the point is lost that recursion is fundamentally what allows you to compute with the same power as a Turing Machine, and that iteration is merely a degenerate form of recursion. The basic problem-solving skill of "Solve a smaller problem first" is the idea captured by recursion, and there are plenty of programs which must make use of this.

I think functional languages do a bad job of preparing would-be programmers for the eventual horrors they may/will face with imperative languages... lets face it -- the von-neumann model is imperative.

What functional languages permit is the use of formal reasoning skills, easily. This idea of reasoning about your program in order to demonstrate its correctness is what much of CS is about. You are then supposed to use those skills when writing your "imperative" programs, or at least think more about what you are doing.
 

smack Down

Diamond Member
Sep 10, 2005
4,507
0
0
Originally posted by: degibson
Originally posted by: lousydood
Originally posted by: degibson
In a way, its too bad you're forced to learn it first, because imperative programming will seem quite alien to you when its dumped on you in subsequent courses.

That's the point of teaching it first. Get the good habits in first, make the bad habits feel "wrong."

I don't know what habits you refer to, probably because I know zip about scheme. There's very little about recursion that's good. Bad performance, bad readability, bad intuition. Prettiness != Usefulness.

I think functional languages do a bad job of preparing would-be programmers for the eventual horrors they may/will face with imperative languages... lets face it -- the von-neumann model is imperative.

You forgot the worst part of recursion, blowing up your stack and starting to write into another tasks memory space.
 

degibson

Golden Member
Mar 21, 2008
1,389
0
0
Originally posted by: lousydood
Originally posted by: degibson
Originally posted by: lousydood
Originally posted by: degibson
In a way, its too bad you're forced to learn it first, because imperative programming will seem quite alien to you when its dumped on you in subsequent courses.

That's the point of teaching it first. Get the good habits in first, make the bad habits feel "wrong."

I don't know what habits you refer to, probably because I know zip about scheme. There's very little about recursion that's good. Bad performance, bad readability, bad intuition. Prettiness != Usefulness.

This is the kind of attitude that I'm talking about. The one that views "recursion" as just some kind of weird alternative to iteration. Sadly, many professors teach in a way to leave this impression. Somewhere, the point is lost that recursion is fundamentally what allows you to compute with the same power as a Turing Machine, and that iteration is merely a degenerate form of recursion. The basic problem-solving skill of "Solve a smaller problem first" is the idea captured by recursion, and there are plenty of programs which must make use of this.

I think functional languages do a bad job of preparing would-be programmers for the eventual horrors they may/will face with imperative languages... lets face it -- the von-neumann model is imperative.

What functional languages permit is the use of formal reasoning skills, easily. This idea of reasoning about your program in order to demonstrate its correctness is what much of CS is about. You are then supposed to use those skills when writing your "imperative" programs, or at least think more about what you are doing.

To agree with smack Down in a slightly reworded fashion:

Recursion is definitely more elegant than iteration. Its elegant, powerful, sometimes even intuitive and useful. Its also nightmarishly slow on real hardware, and has very real stability concerns, especially when coupled with threading.

Elaborating my concerns on 'functional-first' teaching:
I have no objection to reasoning about problems at a high level and then dividing and conquering. The problem with functional languages IMHO is that the underlying hardware isn't functional -- its imperative. When you write functional code, you're writing something that is, at its barest essence, alien to the underlying machine (OK, I will concede that there have been functional machines in the past, but they are currently a $0 billion industry).

There is inherent, unavoidable inefficiency in writing non-toy code in a functional style, so if you ever expect a student to write non-toy code, you should teach them imperative reasoning, as well as expose them to all the horrors that go with it in a controlled environment (e.g. with a TA that can explain what the heck 'Segmentation Fault (core dumped)' means and what to do about it).

Lastly, I firmly believe that formal reasoning is on the verge of useless in a serious modern codebase (especially multi-threaded codes, which arguably will become the norm). Formal reasoning, as it stands today, breaks down in the presence of such rudimentary concepts as an address, and stands no hope whatsoever of understanding such things as atomicity guarantees on bitfields in shared words, device interaction, even vanilla atomic operations.
 

lousydood

Member
Aug 1, 2005
158
0
0
If nothing else, I want you to fundamentally understand one thing.

You cannot escape recursion by dismissing it.

Your implementation-dependent problems are just that -- flaws of your code or your compiler. This isn't about stacks, or your operating system's poor design. This is about simple mathematical facts.

Recursion is fundamental to computer science and computer programs, and there are an infinite number of programs which cannot be expressed without it. This is proven (it's known as the set of partial recursive functions minus the primitive recursive ones, which corresponds to what you know as the Turing-computable.)

All you've managed to demonstrate is your lack of education. Sorry, brutal, but true. I'm a bit disappointed in you degibson, I though you knew better.

 

smack Down

Diamond Member
Sep 10, 2005
4,507
0
0
Originally posted by: lousydood
If nothing else, I want you to fundamentally understand one thing.

You cannot escape recursion by dismissing it.

Your implementation-dependent problems are just that -- flaws of your code or your compiler. This isn't about stacks, or your operating system's poor design. This is about simple mathematical facts.

Recursion is fundamental to computer science and computer programs, and there are an infinite number of programs which cannot be expressed without it. This is proven (it's known as the set of partial recursive functions minus the primitive recursive ones, which corresponds to what you know as the Turing-computable.)

All you've managed to demonstrate is your lack of education. Sorry, brutal, but true. I'm a bit disappointed in you degibson, I though you knew better.

First name one function that has to be done using recursion. Second I don't care how many you named because the processor is iterative so I can't implement them anyways. Third using the stack space data storage is just a bad idea.

The stack space is much more limited then the heap. When I do a new and get memory from the heap I can test if that fails or not and handle it inside my program. How do I test if a function call fails due to out of memory? Better yet how do I test if I just wrote into the stack of another process. Need more prof lets say I have 20 process in shared memory each needing 10% of the memory for a short period of time. Simple when using the heap just malloc it at start and when one of the processes needs the extra memory let them wait for a mutex. How would you handle that if your where using only the stack.