|Join Nairaland / Login / Trending / Recent / New|
Stats: 1076362 members, 1264402 topics. Date: Wednesday, 19 June 2013 at 03:57 AM
|Functional Programming For Java Programmer Scala Or Clojure? by megaplaza(m): 12:51am On Jul 22, 2011|
i have come to notice that functional programming language are finding their way back into mainstream programming. then i found out that java easily integrate with these two functional languages Scala and Clojure. now my questions are:
1. is learning a functional programming language worth it>
2. what are the areas where it can be applied?
besides, i heard it's good to know different kinds of programming langs such as imperative to functional to scripting. i already know java, php, am thinking of learning python or ruby and now scala or clojure and am yet to master java ecosystem or design patterns. i think programming is complicated and highly demanding.
|Re: Functional Programming For Java Programmer Scala Or Clojure? by Fayimora(m): 1:24am On Jul 22, 2011|
Hahhaa you sound frustrated, Something like, "Damn just too many languages and too many people saying different things". Well, to be honest the more languages you know the better BUT is it really worth trying to know them all? Before going into another language, make sure you are at least an intermediate in your current lang. Trust me its not worth being a petty programmer. You dnt wanna be someone who knows how to program in 10 core languages but cant develop a tangible application in 2 of them.
The easiest way I can define Functional programming is "A way of programming, ignoring either state or behaviour". Just like the name functional, it is programmed like mathematical functions. Cant say more.lol
Is it worth learning a functional language like Haskell? Hmmm. I would give you a few qualities of functional programming that I know.
1 - They are very very terse. Straight to the point.
2 - Very safe for multithreading
3 - It aint gat side effects
4 - You can easily test them
and some more i cant remember , I really don't know about the disadvantages or fallbacks cause I don't even care.lol. And just so you know, you can achieve a functional style in java too
Answering you question with regards to where it can be applied, I don't see people developing software with full fleshed functional languages like Haskell, rather they are used for calculations and the likes. So kinda like writing 500 lines of code to help with some funky calculations you do everyday as a clerk
Some students in ma school use it to improve their problem solving skill. Just like saying develop a bank application in one file without objects(Java) Nw dats some task. So they take a very big mathematical problem and rather than solving it easily with an advanced lang, they go functional(Dats madness for me but its fun)
Finally, I can see you are trying to learn as much languages as you can and it has got you wondering if programming is difficult. Well, you made it difficult for yaself. You don't have to listen to what am about to say next because am just a student but trust me I know what am saying. DON"T learn a language just because you want to know it or because a friend knows it. There are soo many other things you are yet to see in the language you already know. If you have to learn a new language, make sure it serves a purpose that no other language which you already know serves.
|Re: Functional Programming For Java Programmer Scala Or Clojure? by megaplaza(m): 1:58am On Jul 22, 2011|
@fayimora, you are on point, am not frustrated just kinda wondering how people cope with knowing these languages and yet good in them. some times you see vets in the field sound as if you don't know these langs you wont make your mark. i have alreayd downloaded scala and clojure compilers and ebooks but i will only read them at my spare time. i am only interested in scala and clojure cos you can use their codes in java and vice versa. you can even use java swings inside scala. else i have decided Java and PHP, i can only expand on branches which scala and clojure fit into.
|Re: Functional Programming For Java Programmer Scala Or Clojure? by Fayimora(m): 2:33am On Jul 22, 2011|
Cool, good for you, So you into software development or web development?
|Re: Functional Programming For Java Programmer Scala Or Clojure? by megaplaza(m): 10:06am On Jul 23, 2011|
|Re: Functional Programming For Java Programmer Scala Or Clojure? by Fayimora(m): 10:33am On Jul 23, 2011|
You are still tryna learn everything, A language that doesn't change the way you think is not wort knowing. I would advice you stick to something for now nd not trying to learn everything
|Re: Functional Programming For Java Programmer Scala Or Clojure? by Seun(m): 7:51pm On Jul 23, 2011|
Scala is worth learning. It's primarily a better Java.
|Re: Functional Programming For Java Programmer Scala Or Clojure? by Fayimora(m): 8:23pm On Jul 23, 2011|
|Re: Functional Programming For Java Programmer Scala Or Clojure? by omo_to_dun(m): 8:57pm On Jul 23, 2011|
|Re: Functional Programming For Java Programmer Scala Or Clojure? by megaplaza(m): 10:20pm On Jul 24, 2011|
@fayimora, i have been in java since 2005/2006, have you read The Pragmatic Programmer, as a professional you are expected to learn atleast one programming language every year while maintaining your base language. am just trying to learn as much as i can it still doesn't change the fact that am a java programmer. i can learn c#, asp.net, ruby, python, , it changes nothing as long as i am updated in java things. i did enough algorithm and data structure in school, i did BASIC, Pascal, C, C++, Java, VB.net, Lil c# u should know that i think independent of java now when implementing a solution. am also studying design pattern book with smalltalk examples. you die in any profession the moment you cease to grow. that said Java is still my favourite and anytime i have my way, i will use java for a project.
@omo_to_dun: Gosling said himself that he doesn't care about java anymore that he cares about JVM and its ecosystem which include scala, clojure, groovy, , have you heard about domain specific lanaguages. it the new paradigm that is taking over.
|Re: Functional Programming For Java Programmer Scala Or Clojure? by omo_to_dun(m): 10:47pm On Jul 24, 2011|
|Re: Functional Programming For Java Programmer Scala Or Clojure? by Fayimora(m): 11:15pm On Jul 24, 2011|
@megaplaza ok cool. Didn't know that you still base on a lang but learn others. I have read part of that book, i just never finish it. By the way you owe me an android app, hmm I wont forget that.
|Re: Functional Programming For Java Programmer Scala Or Clojure? by megaplaza(m): 12:02am On Jul 25, 2011|
@omo_to_dun i have personally said that i dont think a language is better than the other, but one should learn to grow. imagine when java came out and a vb programmer didn't care and was comfortable using vb then didn't even upgrade to .net imagine where s/he will be now. all am saying even if you use the best language update urself about current trends even if you are not going to use it for any project. i did c++ and vb.net even c#.net but am yet to use them for any project and i have not lost anything doing that rather i gain. i noticed the importance of this when i started learning java using Intro to java programming by daniel liang, i thought i know and understand java until i used another book, somethings that i thought were part of java were clear to me to be authors way of writing codes, then i was like what will happen when i learn another language. i did and i gained. as for the Gosling statement check this link
, please i am not here to cause trouble thanks. I am and will always be a proud Java programmer.
@fayimora, yeah it's true i have not forgotten that, just that i dont have free time yet. i have done the login and main control panel but i have projects to deliver to clients. i will deliver it once am through.
|Re: Functional Programming For Java Programmer Scala Or Clojure? by omo_to_dun(m): 12:40am On Jul 25, 2011|
|Re: Functional Programming For Java Programmer Scala Or Clojure? by megaplaza(m): 12:52am On Jul 25, 2011|
thank, it's nothing
|Re: Functional Programming For Java Programmer Scala Or Clojure? by Seun(m): 12:56am On Jul 25, 2011|
omo_to_dun:I've written programs in both Java and Scala, so I'm telling you my reasonably informed opinion.
(Everything you write on a forum or utter with your mouth is your opinion, by the way)
Scala's main merit is that it can do the things Java can do, but more elegantly.
Unfortunately, the limited IDE support and slow compiler can make the gains hard to realize.
|Re: Functional Programming For Java Programmer Scala Or Clojure? by omo_to_dun(m): 1:29am On Jul 25, 2011|
|Re: Functional Programming For Java Programmer Scala Or Clojure? by candylips(m): 9:25am On Aug 03, 2011|
absolutely right. i've been doing scala for a few months now and the elegance of the code is a joy.
Try using IntelliJ IDEA. its scala support is fantastic. Eclipse support is still crap
I think in the future systems will be built in multiple languagues.
The reason for this is that as we continue to build more complex systems, doing so elegantly will not be possible in one langugue hence the recent trend towards Polyglot programming
The idea is to use the best languague to solve a specific problem
for example a simple java swing application written in java is stupidly complex. too much boilerplate code
but use Groovy's swing builder and you will develop the same code in 1/4 the lines of code.
So for example you could see the front-end of systems built in groovy, a concurrent server in the back end probably built in clojure or scala and Java handling the data access layer
Since all these langugues run on the JVM you can still build them into a jar file and the JVM doesn't care
|Re: Functional Programming For Java Programmer Scala Or Clojure? by megaplaza(m): 3:07pm On Aug 03, 2011|
@candylips, i think that led to domain-specific languages? I like dat idea.
|Re: Functional Programming For Java Programmer Scala Or Clojure? by scottN(m): 4:59pm On Aug 08, 2011|
Scala is still in it's developmental state cos it's yet 2 live the lab (still managed by academicians). Inasmuch I love it's features and I've actually written an Enterprise app with it, I still think it's not yet fully matured. So until then I'll still use java for serious projects.
|Re: Functional Programming For Java Programmer Scala Or Clojure? by ekt_bear: 12:03pm On Nov 29, 2011|
^-- Scala is pretty damn mature. It compiles to java bytecode, was invented by the guy who wrote one of the java compilers, and is used in production by Twitter (and a few other notable companies/startups.)
Dunno what else you need to convince you that it is an industrial-strength language.
At topic: I think if you are a programmer and already have experience with a LISP of some sort (e.g. scheme that they teach in intro CS classes), you may be more attracted to Clojure.
If you don't have previous functional programming experience, you'll probably prefer Scala's syntax.
Me personally, I hate all this ((((((((()))))))))))))))))))) syntax that these LISPs have. Though I hear you eventually get used to it.
|This post has been hidden|
|This post has been hidden|
|This post has been hidden|
|Re: Functional Programming For Java Programmer Scala Or Clojure? by advercity: 4:57am On Feb 22|
I've had the dilemma too...Scala or Clojure. I GUESS IT ALL DEPENDS ON WHAT YOU WANT TO DO. Each has its pros and its corresponding cons.
Need Help, Howto Export All Email Addresses On Mdaemon Mail Server: / Runnable Java Atm Source Code Anybody,pls For Project, Very Urgent / [advice request]Would You Recommend Mini Laptop For Programming?
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health