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

Username:   Password: 
 RegisterRegister   
 "Expression Oriented Programming"?
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Sat Sep 10, 2005 5:46 pm   Post subject: "Expression Oriented Programming"?

Just thought I'd run this idea past the gurus here. Smile

There are lots of ways of describing and categorizing programming languages.

Just to name a few:


  • Procedural
  • Imperative
  • Functional
  • Logic
  • Object-oriented
  • Aspect-oriented


But I find that there's one I don't hear much about outside of some Lisp circles.

I look at a language like Ruby, Perl or Smalltalk, for instance, and I see something that obviously isn't a proper "functional programming language", but still shares a lot of the same "feel".

As I pondered this, it struck me that I had gotten that functional vibe because everything returns a value of some kind. Everything is an expression.

So I'm wondering... is "expression oriented programming language" a valuable term?
Sponsor
Sponsor
Sponsor
sponsor
rizzix




PostPosted: Sat Sep 10, 2005 6:34 pm   Post subject: (No subject)

hmm i think you got the concept of "functional programming languages" kindof wrong.. Haskell is a functional programming language... C/Perl/Ruby etc.. dont use proper functions.. the so called "functions" in those languages are really partial functions... (one or more element may not be associated with any element in the co-domain)

edit:...
wtd




PostPosted: Sat Sep 10, 2005 6:37 pm   Post subject: (No subject)

Huh?

I specifically said those languages aren't proper functional programming languages. Just that they feel a bit like functional programming languages in everyday use.

And yes, they all fit into one or the other of the other categories I mentioned (Ruby for instance is object-oriented).
rizzix




PostPosted: Sat Sep 10, 2005 6:38 pm   Post subject: (No subject)

yes.. well what i mean is.. they may feel like it.. but they are NOT functional programming languages.. but only because they allow you to define partial functions..

edit: (when i wrote that post, i was really refering to "As I pondered this, it struck me that I had gotten that functional vibe because everything returns a value of some kind. Everything is an expression." i'm sorry if i misunderstood it.. but i thought ur definition of a functional programing language is a language that has procedures which can return some value..)
rizzix




PostPosted: Sat Sep 10, 2005 6:51 pm   Post subject: (No subject)

anyway.. "expression" may not be a good term.. because in a functional programming language.. everything is an expression.. i mean everything... soo.. yea..

and dosen't "procedural" cover up that definition?
MihaiG




PostPosted: Sat Sep 10, 2005 7:10 pm   Post subject: (No subject)

rizzix wrote:
anyway.. "expression" may not be a good term.. because in a functional programming language.. everything is an expression.. i mean everything... soo.. yea..

and dosen't "procedural" cover up that definition?


ill have to go with rizziz on that one Rolling Eyes 8) 8)
wtd




PostPosted: Sat Sep 10, 2005 7:18 pm   Post subject: (No subject)

I know this is an overly simple example, but when I think procedural, I think:

code:
some_var : some_type

get(some_var)

put(som_var)


As opposed to a more expression oriented:

code:
put get
wtd




PostPosted: Sat Sep 10, 2005 7:24 pm   Post subject: (No subject)

Or perhaps:

code:
if foo then
   bar = 42
else
   bar = 27
end


vs.

code:
bar = if foo then
   42
else
   27
end
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: