Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Is functional programming difficult to learn/teach?
Index -> Programming, General Programming -> Functional Programming
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Fri Dec 30, 2005 5:54 pm   Post subject: Is functional programming difficult to learn/teach?

Thoughts?

I'll post mine after I've gotten some input from others. Smile
Sponsor
Sponsor
Sponsor
sponsor
rizzix




PostPosted: Sat Dec 31, 2005 12:42 am   Post subject: (No subject)

Hmm... I think it would be impossible, if the student hates math. It feels too math-ish.

On the othe hand if the student loves math.. this is going to be a breeze.
wtd




PostPosted: Sat Dec 31, 2005 1:26 am   Post subject: (No subject)

Of course, this is really two questions. What's the answer for complete novices, and what's the answer for students who've gotten used to a different way of thinking about programming.
Cervantes




PostPosted: Sat Dec 31, 2005 10:47 am   Post subject: (No subject)

Novies: If it's a bright class, it might work. Too bad AP CompSci classes are so few and far between.

Students who are used to a different way of programming: Again, it depends on the individual. If the individual is open to new ideas, it should be fine. If the individual is more stubborn, stuck in their ways, and generally does not like learning, then there would definately be problems.
MysticVegeta




PostPosted: Sat Dec 31, 2005 12:43 pm   Post subject: (No subject)

I gotta tell ya people though, when I learned fcns/iterations in grade 9, its wasnt difficult at all, I didnt find it difficult. So my first exp with fcns was in programming rather than math, then in the summer vacation, I thought lets see if the Math fcns resemble the programming ones, they are actually quite similar. In grade 10 when our teacher taught us the unit on fcns, I skimmed through it because I already had a good exp. with fcnal programming that I found it easy besides I had already learned the math ones before...

Overall, I would say, it depends on your teacher and your self learning skills. If the student has tackled fcns or fcnal programming on his "own" before he was even taught, it would be really helpful for him but if not then it might get a little confusing but I don't see why its that hard..
Cervantes




PostPosted: Sat Dec 31, 2005 5:42 pm   Post subject: (No subject)

Subroutines that return values is not the discussion here. The discussion is functional programming as a classification, like imperative programming or object-oriented programming. Haskell is a functional language. O'Caml is partly functional.
wtd




PostPosted: Sat Dec 31, 2005 5:44 pm   Post subject: (No subject)

Cervantes wrote:
Subroutines that return values is not the discussion here. The discussion is functional programming as a classification, like imperative programming or object-oriented programming. Haskell is a functional language. O'Caml is partly functional.


O'Caml is functional, and not just partly so. It would be more correct to say that it's impurely functional, since functions can have side-effects.
MysticVegeta




PostPosted: Sun Jan 01, 2006 12:58 am   Post subject: (No subject)

Cervantes wrote:
Subroutines that return values is not the discussion here. The discussion is functional programming as a classification, like imperative programming or object-oriented programming. Haskell is a functional language. O'Caml is partly functional.


OOP such as turing like and imperative as in others?
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Sun Jan 01, 2006 1:25 am   Post subject: (No subject)

No, OOP like Java and imperative like Ada. Smile
If I am not mistaken, what you were referring to previously would not be functional programming, but procedural programming.
Cervantes




PostPosted: Sun Jan 01, 2006 11:27 am   Post subject: (No subject)

[Gandalf] wrote:
No, OOP like Java

We can do better. Smalltalk, Ruby... Io. Though Io is a little different, in that it uses Prototype-based programming. Rather than writing classes, we clone objects.
MysticVegeta




PostPosted: Sun Jan 01, 2006 12:45 pm   Post subject: (No subject)

Isnt turing object oriented :S
Cervantes




PostPosted: Sun Jan 01, 2006 1:05 pm   Post subject: (No subject)

Don't let the name, OOT, fool you. Turing is very weakly object-oriented. You can write classes and create objects, but its capabilities in this realm are quite limited. Though it may have some object capabilities, it is certainly not object-oriented.

Take a look at Ruby, a language that is truly oriented around objects: it has OOP built into it from the ground up. Everything in Ruby is an object, even fixed numbers, like 5.6.
Ruby:

5.6.round  # returns 6

Instead of calling a round method from a Math module, we call the round method on the object, 5.6.


Uh.. to return to the topic, what are your thoughts, wtd?
wtd




PostPosted: Sun Jan 01, 2006 1:43 pm   Post subject: (No subject)

My thoughts, eh?

You're doing a wonderful job. The first step in answering this question, I think, is to understand what a functional programming language is. Smile
MysticVegeta




PostPosted: Sun Jan 01, 2006 4:29 pm   Post subject: (No subject)

Cervantes wrote:
Don't let the name, OOT, fool you. Turing is very weakly object-oriented. You can write classes and create objects, but its capabilities in this realm are quite limited. Though it may have some object capabilities, it is certainly not object-oriented.

Take a look at Ruby, a language that is truly oriented around objects: it has OOP built into it from the ground up. Everything in Ruby is an object, even fixed numbers, like 5.6.
Ruby:

5.6.round  # returns 6

Instead of calling a round method from a Math module, we call the round method on the object, 5.6.


Uh.. to return to the topic, what are your thoughts, wtd?


ouch the name OOT fooled me Embarassed So isn't it illegal for them to call their lang OO if its only partly OO..?
wtd




PostPosted: Sun Jan 01, 2006 4:58 pm   Post subject: (No subject)

It technically does provide the ability to program in an object-oriented manner. It does just about everything possible to discourage it, though.

Turing was designed to supplant Pascal. Pascal has no meaningful standard way of doing object-oriented programming. You can see, therefore, how it would not be a priority.

I suspect those features were tacked on so they could say the language was object-oriented and fend off Java for a bit until they convinced schools to go with RTP for Java classes.
Display posts from previous:   
   Index -> Programming, General Programming -> Functional Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 17 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: