Author Topic: Functional Programming  (Read 1742 times)

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Functional Programming
« on: January 16, 2011, 10:48:28 pm »
Do you think functional programming will mature enough and hit the main stream? There are some practical functional languages now that are pretty nifty, like Scala.

(If you are good with and like Java, then I recommend you at least look at Scala. It compile into .class files, and can use java libraries, but it is a functional and object oriented hybrid language, and it is really nifty. And naturally, the "official" implementation is open source. IDE support is currently a little iffy, sadly.)

Offline Nalgas

  • Hero Member
  • *****
  • Posts: 680
Re: Functional Programming
« Reply #1 on: March 01, 2011, 07:07:07 pm »
Do you think functional programming will mature enough and hit the main stream?

It's plenty mature enough to be used for some fairly major applications.  I have a couple friends at ITA who've done a bunch of stuff there in Lisp, which has probably been used (indirectly) by the majority of people who've booked a flight in the US in the past few years.

As for whether it'll become as popular and widely used as other programming styles, who knows?  There's always someone doing something neat with it academically, but it always seems to not quite go anywhere outside of that.  There are definitely things it could be useful for if it were presented and taught right and had a good set of tools to work with, but considering how most people seem to still have not figured out how to teach basic OO stuff in a way that doesn't require un-learning it all to do it again properly later (intro CS courses make me sad...and don't even get me started off on a tangent about the utter disaster that passes for math education), I'm not getting my hopes up.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Functional Programming
« Reply #2 on: March 01, 2011, 07:58:54 pm »
Do you think functional programming will mature enough and hit the main stream?
There are definitely things it could be useful for if it were presented and taught right and had a good set of tools to work with, but considering how most people seem to still have not figured out how to teach basic OO stuff in a way that doesn't require un-learning it all to do it again properly later

Well, one way to help bridge the gap of understanding is that in functional languages, functions and blocks are themselves objects as well. (May not be technically correct for all functional languages, though it is for Scala, but it does help to get an idea for what a functional language can do)

Also, even though I am a Java buff, I have no problem understanding other programming paradigms. However, I do like strong type safety at compile time, which is one of the reasons that I don't like Lisp.

Offline Nalgas

  • Hero Member
  • *****
  • Posts: 680
Re: Functional Programming
« Reply #3 on: March 01, 2011, 08:21:09 pm »
However, I do like strong type safety at compile time, which is one of the reasons that I don't like Lisp.

I used to think I was like that, too, but then all the wacky stuff you can do in ObjC and Python changed my mind.  It does give you the ability to gloriously screw things up if you're lazy and not careful with it, but there's just something fun about being able to rewrite half your program while it's running, even in a compiled-not-interpreted language, and that's not even getting into the kind of crap something like Lisp lets you get away with (which I honestly don't have the best grasp of, not having really used it for anything myself).

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Functional Programming
« Reply #4 on: March 01, 2011, 08:25:55 pm »
However, I do like strong type safety at compile time, which is one of the reasons that I don't like Lisp.

I used to think I was like that, too, but then all the wacky stuff you can do in ObjC and Python changed my mind.  It does give you the ability to gloriously screw things up if you're lazy and not careful with it, but there's just something fun about being able to rewrite half your program while it's running, even in a compiled-not-interpreted language, and that's not even getting into the kind of crap something like Lisp lets you get away with (which I honestly don't have the best grasp of, not having really used it for anything myself).

Personal opinion I guess. With a proper object architecture, being forced to "work around" the type system in a strongly typed language should be a very rare need. But I can see the advantage in weakly typed languages as well.

In other words, my opinion is strongly typed, but it is mostly up to opinion. I won't try to "convince" others to "my side". You can use and abuse both just as much after all.  ;)

Offline Nalgas

  • Hero Member
  • *****
  • Posts: 680
Re: Functional Programming
« Reply #5 on: March 02, 2011, 05:35:11 am »
Personal opinion I guess. With a proper object architecture, being forced to "work around" the type system in a strongly typed language should be a very rare need. But I can see the advantage in weakly typed languages as well.

In other words, my opinion is strongly typed, but it is mostly up to opinion. I won't try to "convince" others to "my side". You can use and abuse both just as much after all.  ;)

Definitely a matter of opinion.  I'm actually fine with either way of doing it and don't really promote one over the other, much less insist that only one of them is "correct".  Both sides have their good (Python) and bad (PHP, which just makes me feel dirty) examples, and yeah, you can absolutely abuse or do horrible things with just about anything out there.  Heh.