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

Username:   Password: 
 RegisterRegister   
 Things I miss since learning O'Caml
Index -> Programming, General Programming -> Functional Programming
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Fri Aug 25, 2006 3:46 pm   Post subject: (No subject)

An unnecessary dichotomy.

Why is there a need for "statements" at all? Certainly expressions that return "unit" or something comparable provide all the same functionality.
Sponsor
Sponsor
Sponsor
sponsor
rizzix




PostPosted: Fri Aug 25, 2006 3:52 pm   Post subject: (No subject)

It's more intuitive.
In a natural language, you have words which compose clauses/phrases which compose statements which compose paragraphs, which finally composes an article.
Similarly, in a strucured language (like C/Java) we have expressions which compose statements which compose blocks, which finally composes a program.
Cervantes




PostPosted: Fri Aug 25, 2006 4:04 pm   Post subject: (No subject)

Granted, statements might be a little more intuitive. But I think it's a pretty poor argument when you consider the power and flexibility that comes with embracing expressions over statements.
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 2 of 2  [ 18 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: