It's an OOP world... is it? ...still?
-
Honestly I love OOP. From the very beginning of my programming career I loved breaking things into small units, reassembling them to bigger objects and then make them do the work they were supposed to do. Over the time I got that "feeling" how the problem I am trying to solve can be splitted and how the object structure should look like (at least in my opinion). So far I was happy, but times are changing, don't they? What are the alternatives (functional programming, etc)? What kind of alternative do you like most and why? Into what direction should I turn my head to maybe fall in love with another paradigm? What's your opinion? I am looking foreward to you replies cheer Andy
Wow, that's almost my sig right there in the title :D Although my sig isn't necessarily about programming...
It's an OO world.
public class Naerling : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
} -
hoernchenmeister wrote:
Into what direction should I turn my head to maybe fall in love with another paradigm?
My advice is to not fall in love with any paradigm - just use whatever is best for the problem you are trying to solve. I was trying to make everything pure OOP when I was young and silly, but then I learned it didn't make much sense. Nobody even agrees what "pure OOP" is. If you need a class hierarchy, go and make one; if a problem is better solved with a simple function, make one and don't feel guilty about it. There is even a buzzword for the approach I suggest: Multiparadigm Programming[^]
Don't just write as function - use a static class...
-
Functional programming made some sort of a comeback recently, but IMO, OOPS still runs strong!
Too much of heaven can bring you underground Heaven can always turn around Too much of heaven, our life is all hell bound Heaven, the kill that makes no sound
Functional programming might someday be interesting, but today we don't know how to compile functional programs efficiently. OOP is the way to go for the next 5-10 years unless some academic gets off their lazy butt and brings it to functional programming. Oops, did those words come out of me?
-
Honestly I love OOP. From the very beginning of my programming career I loved breaking things into small units, reassembling them to bigger objects and then make them do the work they were supposed to do. Over the time I got that "feeling" how the problem I am trying to solve can be splitted and how the object structure should look like (at least in my opinion). So far I was happy, but times are changing, don't they? What are the alternatives (functional programming, etc)? What kind of alternative do you like most and why? Into what direction should I turn my head to maybe fall in love with another paradigm? What's your opinion? I am looking foreward to you replies cheer Andy
hoernchenmeister wrote:
What are the alternatives (functional programming, etc)?
Functional programming isn't new. Technology of any sort which people find beneficial will rapidly evolve to the norm. Technology that is not beneficial will be discarded or relegated to niches. This will happen regardless of how it is packaged (re-packaged) or promoted. Examples of successes are OO, relational databases and cell phones. Examples of failures are web only computers, object oriented databases and Java J2EE Entity objects. One will fail at attempting to predict future successes (and if not find a avocation where you can make real money predicting the future) and doesn't matter much because specializing even in something that will someday rule the world means that until that time comes your skill set will not meet the needs of most businesses because they will be using the norm. And functional programming has been around long enough that I seriously doubt it will make any inroads except that one must deal with maintaining code created by those that rationalize it at the time as a good choice.
-
Honestly I love OOP. From the very beginning of my programming career I loved breaking things into small units, reassembling them to bigger objects and then make them do the work they were supposed to do. Over the time I got that "feeling" how the problem I am trying to solve can be splitted and how the object structure should look like (at least in my opinion). So far I was happy, but times are changing, don't they? What are the alternatives (functional programming, etc)? What kind of alternative do you like most and why? Into what direction should I turn my head to maybe fall in love with another paradigm? What's your opinion? I am looking foreward to you replies cheer Andy
OOP is still dominant but functional is the best outside of it. I have started looking into functional programming with F# and it's pretty awesome. Nice functional features like pattern matching and immutable data structures make for elegant, readable, and easy-to-understand code. Also, some problems are solved with functional languages in a much more succinct and elegant way than in OOP. Like what was said before, functional is great for algorithmic heavy problems (academia, intense mathematical applications, etc.). OOP still probably makes sense for the typical business application.
-
Sounds like a good advice to me... ...and I learned another Buzzword ;)
Anyone who wants to go back to spagetti code needs to be wacked over the head with a bat to improve their brain function. Yea, neither you, nor anyone else has suggested it. Just putting in my two cents. I don't know anything about functional programming, but breaking up code into smaller units is a good idea in any language. I had one case where a fellow student calculated it would take 6 months to run the computer through the possible combinations to solve the problem presented. I wrote code that found solutions and ran in 5 minutes. I had enough time to verify my code had problems and left class and the problem behind. I rewrote it later and that should run in 8 minutes on the same computers. (Runs in 2 minutes on my laptop.) I broke the problem into pieces, solved each one in order. I calculated if you just looped without any intelligence the loops would take quintillions of years. (7 to the 40th power loops.)
-
Take a look at this: http://www.schloerconsulting.com/quantum-computer-q-lisp-programming-language[^] And this: http://en.wikipedia.org/wiki/Quantum_programming[^] Do you know why Functional programming is the first choice for the next generation of computers? The answer is simple: because it's declarative and it's all about PROBABILITY (quantum computing is about probability), and functional programming is too good for calculate probability: http://www.schloerconsulting.com/ibm-speech-schloer-slovenia[^] When hardware changes too much like that, C, C++ or whatever language stay close to the machine will die. All are now moving to declarative languages. Finally, you may want to contact the author of this blog: http://axisofeval.blogspot.com/2011/01/why-lisp-is-big-hack-and-haskell-is.html[^] He may have loads of information for you.
Hey! Yo!
Thanks for the links It is very much appreciated :)
-
Wow, that's almost my sig right there in the title :D Although my sig isn't necessarily about programming...
It's an OO world.
public class Naerling : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}Honestly, I came across your sig several times already, must have stayed im my head somehow ;)
-
Don't hold your breath, I remember that was a common belief with a number of 4GL and app-builders in the 1980's.
What you say is right. But there is a big difference between these days and the old ones. In that stage the programming languages was not mature like the one these days. These days in the new programming languages when you want to sort an array all what you have to do is call the Sort method without knowing how it do it. I think using the technologies available these days we can jump for the next technology. And to be a little bit biased, we already building this such a technology in our company and it is good with a lot of features.
-- Hasan Al-Halabi Chief Operation Officer "COO" What's Next! for Business Solutions Queen Rania Str. Building 313, 4th Floor, Office 409 P.O.Box: 143882 Amman 11814, Jordan Mob: 962 7 97958819 Tel: 962 6 5334478 hasanhalabi@whats-nxt.com http://www.whats-nxt.com
-
hoernchenmeister wrote:
Into what direction should I turn my head to maybe fall in love with another paradigm?
My advice is to not fall in love with any paradigm - just use whatever is best for the problem you are trying to solve. I was trying to make everything pure OOP when I was young and silly, but then I learned it didn't make much sense. Nobody even agrees what "pure OOP" is. If you need a class hierarchy, go and make one; if a problem is better solved with a simple function, make one and don't feel guilty about it. There is even a buzzword for the approach I suggest: Multiparadigm Programming[^]
Honestly the main problem is people not knowing when to use OO. Objects are great, but not the solution to every problem. It also depends on your goals and the platform you're working on. To give an example. If you're writing code for a small embedded system you should be careful. Using OO is less effective than other approaches in terms of memory use. That's a well known fact. And don't even think about garbage collecting. Now you might say "just use a microcontroller with a larger memory". The additional cost on a single device is indeed small. Now step into a production environment where you make thousands of units. A few cents more is going to make a large difference. And don't start claiming it's a good idea cause Arduino sort of gets away with it. We also live in a world where power efficiency is becoming important as more and more devices are battery powered. More powerful microcontrollers and processors don't perform all too well in that aspect. The only solution is to program in C or go all the way for assembly. This leads to hard to manage code. But there doesn't seem to be much of a way in between. Due to the latter I've grown rather fond of VHDL (and other similar languages for that matter) lately. It's still quite different from OO programming but has a lot of similarities as well I find. Sadly it's not well suited for writing computer programs. Another issue is that most programmers are too bogged down in conventional programming paradigms to become any good at it. But this probably isn't very relevant to most people here. To sum up my argument: Use OO when it gives you an advantage. Don't when it overcomplicates things.
-
Honestly, I came across your sig several times already, must have stayed im my head somehow ;)
Glad I could make a small difference :)
It's an OO world.
public class Naerling : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}