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

Username:   Password: 
 RegisterRegister   
 An Open Challenge
Index -> Programming, General Programming -> Functional Programming
Goto page Previous  1, 2, 3, 4  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rizzix




PostPosted: Sun Feb 26, 2006 12:57 am   Post subject: (No subject)

wtd wrote:
As opposed to having a favorite language and then trying to justify its use in education. I probably won't seem flexible as I've done this analysis in detail and arrived at O'Caml. Smile
Hmm, could you ellaborate?
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Sun Feb 26, 2006 1:31 am   Post subject: (No subject)

Well, I carefully considered what I thought were critical for intro programming education.

The environment has to be free, cross-platform, and preferably open source to ensure that one vendor cannot cause development to stagnate.

An interactive environment is desirable to ease experimentation with simple concepts.

It should also be possible and simple to produce stand-alone executables.

It should be easy to extend the language by interfacing to existing code written in other languages. This way functionality can be added as deemed necessary by educators.

It should expose students to (not necessarily in exact order):


  • Console and file I/O.
  • Binding values to names.
  • Variables, initialization and updating.
  • Conditionals.
  • Functions.
  • The differences between expressions and statements.
  • Looping/recursion.
  • Lists, arrays, hashes and other containers.
  • Custom data types, including record types.
  • String handling.
  • Code re-use via modules or packages. Preferably with export control.
  • OOP and everything that entails.
rizzix




PostPosted: Sun Feb 26, 2006 12:07 pm   Post subject: (No subject)

What if Turing was improved (and made free) would you consider it over O'Caml?
Cervantes




PostPosted: Sun Feb 26, 2006 2:15 pm   Post subject: (No subject)

rizzix wrote:
Acutally this is a Very Bad Thing IMHO. The best language would be one where the student didin't even know there's was a whole new side to language untill he reaches a higher level, grade etc. Keeping things hidden from the student (while he's aware of it) leaves him in the dark. This should not be the case.

I'm confused. You say "[k]eeping things hidden from the student... should not be the case", yet you say "[t]he best language would be one where the student didn't even know there's a whole new side to the language until he reaches a higher level...". Isn't the student not knowing there's another side to the language keeping things hidden from the student?

A language like Ruby or Java, where higher level concepts are required to understand simple programs, is good and bad for teaching. It pushes the students onwards to learn those high level concepts, but also makes the initial programs harder to understand. Turing is both bad and good, for being the opposite.
wtd




PostPosted: Sun Feb 26, 2006 2:22 pm   Post subject: (No subject)

rizzix wrote:
What if Turing was improved (and made free) would you consider it over O'Caml?


Perhaps. I would have to ask why you'd undertake such an effort to avoid O'Caml, though. Smile
wtd




PostPosted: Sun Feb 26, 2006 2:34 pm   Post subject: (No subject)

Oh, an important skill:

How to write robust code. O'Caml (and functional programming languages in general) offer help here.

In O'Caml aside from cases where a conditional is taking some action that has side-effects, there hase to be a catch-all else.

In pattern matching, if there is any value that cannot be matched, the compiler will complain loudly.

Surely this is important at any level of CS education.
rizzix




PostPosted: Sun Feb 26, 2006 4:50 pm   Post subject: (No subject)

Cervantes wrote:
I'm confused. You say "[k]eeping things hidden from the student... should not be the case", yet you say "[t]he best language would be one where the student didn't even know there's a whole new side to the language until he reaches a higher level...". Isn't the student not knowing there's another side to the language keeping things hidden from the student?


Well what I'm trying to say is don't put the student into a situation where he knows there is some good reason as to why he's coding things a certain way, but he does not exactly know why he's doing it. This is what it means to leave the student in the dark and is a Very Bad Thing in my opinion.
wtd




PostPosted: Sun Feb 26, 2006 7:28 pm   Post subject: (No subject)

Students should understand why it's beneficial to do things "the right way." They should not just chalk it up to, "oh someone way smarter than me said to do it this way."

The former is abstract thinking.
Sponsor
Sponsor
Sponsor
sponsor
chrispminis




PostPosted: Mon Feb 27, 2006 9:36 pm   Post subject: (No subject)

I'll perhaps try this O'Caml sometime.

But as a novice programmer, I can tell you. Turing is an incredibly easy language to learn. I don't know any other languages well enough to compare. But it is terribly easy. Yet somehow, there are many in my CS class who refuse to understand it. They remain ignorant, and it's often frustrating listening to their stupidity.

Turing does encourage the creation of games. When I chose CS as a course I aspired to create a few interesting droleries. Little did I know, with almost no knowledge of programming concepts, I was able to make a basic game. A counterpart in winnipeg, with whom I correspond, is studying another language (Can't remember, was it Turbo Pascal or something?) has not even hoped of creating a game, yet he was (is?) considerably more advanced than I, in programming skill.

Guide me, oh, programming Gods that you are. Smile
rizzix




PostPosted: Mon Feb 27, 2006 9:38 pm   Post subject: (No subject)

Are you good in math? Smile (and by math I mean algebra)
wtd




PostPosted: Tue Feb 28, 2006 2:25 pm   Post subject: (No subject)

http://www.cabochon.com/~stevey/blog-rants/more-ocaml.html
Cervantes




PostPosted: Tue Feb 28, 2006 5:11 pm   Post subject: (No subject)

Quote:

And yeah, OCaml is pretty much the most expressive language I've ever used, maybe more expressive even than Ruby and Lisp, and I'm still not finished learning the more exotic features like Functors.

Whoa! Interesting. I thought of it as elegant, but not expressive, not like Ruby.

This is very cool. What a huge boost for O'Caml. People, learn it.
wtd




PostPosted: Tue Feb 28, 2006 6:14 pm   Post subject: (No subject)

http://www.cabochon.com/~stevey/blog-rants/choosing-languages.html
chrispminis




PostPosted: Tue Feb 28, 2006 8:03 pm   Post subject: (No subject)

Well I believe I am. Algebra is easy, and I'm capable of logic. Math has always been one of, if not, the strongest points for me. I learned at an early age and was well advanced, scoring fairly high in early math competitions. Unfortunately recently I have slacked off, and the school system has almost caught up with to the point that I actually learn stuff in math class now. I am only grade 10, so I'm not too familiar with some aspects. But then again I think its mostly the logic that helps with programming.
wtd




PostPosted: Tue Feb 28, 2006 10:11 pm   Post subject: (No subject)

Which makes more sense to you? Smile

code:
def greet(names)
   if names.length == 0
      puts "No one?  Don't be shy!"
   elsif names.length == 1
      first_name = names[0][0]
      last_name = names[0][1]

      puts "Hello, #{first_name} #{last_name}!"
   elsif names.length == 2
      first_name1 = names[0][0]
      last_name1 = names[0][1]
      first_name2 = names[1][0]
      last_name2 = names[1][1]

      puts "Hello #{first_name1} #{last_name1} and #{first_name2} #{last_name2}!"
   else
      puts "Whoa!  Don't crowd.  There's plenty of me to go around."
   end
end


Or...

code:
let greet =
   function
   | [] -> print_endline "No one?  Don't be shy!"
   | [(first_name, last_name)] ->
      Printf.printf "Hello %s %s!\n" first_name last_name
   | [(first_name1, last_name1); (first_name2, last_name2)] ->
      Printf.printf "Hello %s %s and %s %s!\n" first_name1 last_name1
                                               first_name2 last_name2
   | _ -> print_endline "Whoa!  Don't crowd.  There's plenty of me to go around."
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 3 of 4  [ 52 Posts ]
Goto page Previous  1, 2, 3, 4  Next
Jump to:   


Style:  
Search: