I fail to understand why Object-Oriented and Functional programming are so often portrayed as opposites. Nothing could be further from the truth... if anything, the two paradigms are completely orthogonal.
The real opposites here are imperative vs declarative programming, with FP being a subset of declarative programming. Many languages (including Java) are able to support both imperative and declarative styles with varying degrees of ease. Object-Orientation works just fine in a purely functional context, and Alan Kay - who coined the term - did his first experiments in the area of OO building on top of LISP... CLOS gives a clear example that FP doesn't mean not-OO. Or if you prefer something closer to home, JodaTime is a very good example of functional design. So does avoiding OO in the first semester/year/whatever mean that it's being abandoned in favour of pushing FP? Absolutely not! It just means that the lecturers recognise it to be a paradigm more suited to larger composition and to system level design, problems that aren't really appropriate for teaching someone's first steps in programming. For smaller-scale work, functional composition is far easier to teach and understand, On 21 March 2011 17:48, Carl Jokl <carl.j...@gmail.com> wrote: > It does look like a high degree of pet subject enthusiasm on the part > of the person running the course. As much as Java is mentioned in the > article, Java did not invent object orientation and there are many > other Object Oriented languages or languages which have embraced > object orientation after their initial invention. I don't see > functional programming being the silver bullet which makes all Object > Oriented systems redundant. > > Is what is being suggested here that data and functionality should be > kept separate for the greater good? I can see some of what is being > suggested but I don't believe that having data in special data > structures and functions to work on the data automatically makes a > system more modular and reusable. The code in the function may expect > data in a very problem specific way or the function may perform > functionality which is so specific to a given problem that it may not > be any more reusable than code on an object where the data and code > are combined together. > > Having data and functionality separate is somewhat the case with C > isn't it. C however does have some state by virtue of static variables > which can point to some other kinds of state holding structures. > > I don't know. Some of these food fights and almost dogmatic talk of > the one enlightened way of doing things can make me feel fed up with > the whole programming community. I always end up doing the wrong thing > according to someone. > > -- > You received this message because you are subscribed to the Google Groups > "The Java Posse" group. > To post to this group, send email to javaposse@googlegroups.com. > To unsubscribe from this group, send email to > javaposse+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en. > > -- Kevin Wright gtalk / msn : kev.lee.wri...@gmail.com <kev.lee.wri...@gmail.com>mail: kevin.wri...@scalatechnology.com vibe / skype: kev.lee.wright quora: http://www.quora.com/Kevin-Wright twitter: @thecoda "My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger" ~ Dijkstra -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com. To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.