- Joined
- Sep 22, 2008
- Messages
- 602
- Reaction score
- 2
- Points
- 0
Good, something I can work on and get real resultsFine, you wanted it, you'll get it (But warning, I am deeply in Party Law today, so don't be shocked when I start to sing my clubs anthem while typing this):
No worries, it's an awfully common mistake.Oh, my fault...in German, the language is assembler as well. Must do this error often.
Now to the counter-arguments, starting from the more 'emotive' ones:
Really? Where?Can you tell me any rational argument in your post? You are only ranting on the emotional level, really like a fan boy.
Yes, I was a bit over the line here, and I'm sorry. My point in including this is that so much focus on a single feature or paradigm makes you think it's the only way to do it and it's possible to sometimes overdo it, and that all the other possibilities are plain wrong.Also, "OOP masturbation" is a good reason more to doubt your experience with OOP. I don't need harsh words against functional programming, because I can talk about it without hate speak.
Wait, what? That's the whole point of abstraction, to hide some details from the programmer, or, in other words, 'do the thinking for them'.I at least remember which brainless coding makes me hate people who think they can let their programming language do the thinking for them.
Of course not. I think that this kind of complex structure is sometimes superfluous. I really wouldn't like use OOP just to print 'Hello, World!' as I'm forced to do in Java. And I surely wouldn't use OOP for symbolic processing.So, you think that structuring programs by inheritance, having encapsulation of data or have code representations of formal software design tools is superfluous?
None. Programming is hobby for me and I don't have some pesky boss trying to force something on me. That's why I'm exploring the possibilities.maybe you should ask yourself how much professionalism you have.
Of course you have, which actually doesn't mean anything. It's just that functional programming != better paralelization. Saying that, because of function purity, today, is like saying that functional programming may be better because of garbage collection, while still disregarding it as a theoretical 'toy'.Don't assume, because you make an ass out of U and me. I had likely seen more functional programming in my life than you did
Hell no, it's not a hype, at least not for me. Neither functional languages (Lisp and Haskell) are new, actually Lisp is the second-oldest language still alive (~50 years old, or something like that), and Haskell is ~20 years old. Those are only two of the languages that I'm learning/using, and I really don't regard a language or programming paradigm as a religion, which seems to be the contrary of what you're doing with OOP. Yes, OOP is perfect for solving a class of problems, but it's not the definite answer. The whole point of this series of posts is for me to know why you disregard functional programming. The closest answers I got are these:When the hype praises Haskell, Haskell is great. When people realize, that, just like with Lisp, it doesn't leave its theoretical niece and remains a toy for fans, it will be forgotten, just like many other hyped programming languages in the past. [more rant about hyped languages]
both are nice for theory, but effectively useless for praxis, since more than a few algorithms with them is impossible, since the reality is not that function oriented
I don't want to do larger projects in a function oriented language, not even with something like Scala, because other languages are far more better suited for the task - the function orientation, which is nice for multi-core optimization, can also be reproduced in other languages, with more effort. and that is the problem for current function oriented languages: They are too theoretical for being irreplaceable.
(at least, they have more purpose than closures, which is a nice pattern that can be replaced by about one dozen alternatives, unless you are limited to function oriented programming)
And how to develop a full application for a complex task in a function oriented language, when this task negates nearly all advantages of functional programming?
Just try to model events in a purely functional task, where imperative languages have better reactions.
For me, those are you opinions, as I haven't read a line justifying those affirmations. Which may be better for some tasks: pooling for events every X seconds, or passing first-class function to be called when the event triggers? The second presents one of the characteristics of functional programming: function as data. I already see a point here for functional programming. Oh, and BTW, show me a OOP feature that can't be implemented in a purely procedural language. I take you already know Glib, and it's OOP implementation for C called GObject? And CLOS for Lisp? Unless the language is not turing-complete, you can implement any features you want in it, which makes this kind of argument pointless. Just because I have objects in C, does it means I'll never program in C++/Java?And please: Show me one semantic feature of closures, that can't be implemented in object-oriented or imperative languages without using a closure.
You're basically saying that functional programming is not the right tool for any job, right? If so, there's a contradiction:It is more than that, it is a matter of : The right language for the right task. You can't write a Real-time system in Visual Basic, so why try it?
And Java is just another object-oriented language. Same kind of dogma as functional programming or imperative programming, not worse, not better.
Imagine you have a function which takes the derivative of another function. Is it better to implement it in a functional paradigm, or using OOP?
There are a bit more I want to say, but I not finding a good way of expressing it. This post is long enough though. I'm waiting for you answer :thumbup:.
). If I have to do it for work, a 90% solution in 10% of the time for the 100% solution becomes the standard. If you do it for work, you also can't reinvent the wheel every week, in the best case, you are even expected to bring your solutions into the companies "code pool"/standard library for future use. And you start to learn that the bad things of programmings are actually the good side of the force: