Learning functional programming after other programming paradigms [closed] - haskell

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have taught myself C, Python, Java and a few other procedural or object oriented languages to an intermediate degree from resouces on the internet (thanks SO :D) and in books. When I tried to learn Haskell, I couldn't wrap my head around what the code actually did.
Is there a better functional language for someone coming from a background in procedural or object oriented programming to learn? Are there any resources meant for people in my situation?
Thanks!

It's probably varies with people (and this question is bound to get closed over that), but the way I see it: there isn't a stair you need to step on before you can be within reach to Haskell.
So I'd say you're not driven temporarily off necessarily by the language, but by your sources of learning. For the only truly gentle introduction, I recommend LYAH. It keeps things within reasonable difficulty and it has some really entertaining points every now and then.
However, if you still want to almost-soften your transition, you can check out F# which isn't a functional language but it will give you a good taste of FP, and it will be very familiar to you because you still live in an OO world.
You can also check out basically any other functional language and it will give you some of the mindset (Scala, ML, etc.).
Keep in mind that I say "almost-soften", because Haskell is very different (especially because of purity), and that gives you a very logical and mathematical mindset to things and that has been very different for me than any other language I learned. It's incredible. It was much beyond learning different syntax, it's a way to think about things and I can always find myself learning more and a truly amazing part of it is that (since it's so logical, mathematical, reasonable, etc.) the new ways of thinking I acquire with Haskell don't leave me both when I use other languages and even in my personal daily life.
That being said, the only thing truly horrible with Haskell is that it ruined me for other languages. I used to like C#... :(

Related

What is extreme programming and when it is using? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I am new to programming and I try to research as much as possible in this field. And once I came across to this expression: "Extreme and pair programming". Pair programming is an easy term, and I found quite clear documentation about this. But extreme programming... I found some articles about it, but explanation wasn't so well. All I understood that extreme programming is an Agile development framework. But why I must use that, what is difference between this and another types of programming styles?
Can anyone explain me what is extreme programming language very clearly?
Extreme programming (often called XP) is an agile framework that was developed by Kent Beck in the 1990's.
There aren't too many people that use the whole XP framework these days, but a lot of the engineering practices it popularised are very common.
Examples include:
Pair programming
Test driven development
Continuous integration
Frequent releases
Constant refactoring
XP favours an approach of writing the minimum amount of code to solve the problem at hand. Things like optimisation and forward planning are generally a low priority. This is the 'extreme' part of extreme programming.
The idea is that you write code to solve the current requirement. If you then find you need the code to be faster, or scaleable, etc. then you refactor it.

Why would i learn erlang or haskell? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Why should I learn Haskell, Erlang or other concurrent languages if I am already an OCJP and can master C/C++?
People have a craze of learning Erlang, Haskell, Oz, Prolog. But is it really necessary? Does it have any scope in a programmers carreer?
The main reason to learn new programming language is not in learning just another programming language but to learn new programming paradigms, techniques and tools. Once I learned Prolog I started to write very different C code. It happen again with Perl and again with Erlang. It change way how to you will see problems and how you decompose them into manageable chunks and also way how you will implement them in readability and maintainability sense. But don't forgot learn how to write Perlish, Haskellish and Erlangish and whatever way. If you will write C like code in all those languages it will be waste of time.
Haskell is a functional programming language. I had the chance to learn few things about Haskell last year and i can say it was something new.
I think you should dive into Haskell, you'll have to use only recursive functions as there is no loops. It helped me a lot to improve my programming methods.
Give it a try and if you don't like it, just try something else.

beginning functional programming with haskell? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Please excuse my poor English ,i am new to programming in the past 6 months i have learned java and c and have been suggested to get exposed to functional programming, is haskell a suitable language for a beginner?
Yes, Haskell is a suitable language for a beginner. In some ways it's easier to learn a functional programming language like Haskell if you haven't been steeped in the Object-0riented tradition. Since you're relatively inexperienced as a programmer, you're still learning the basics of how to analyse a problem and break it down into a series of definitions/steps, and how to debug; those skills are transferrable.
You will find Haskell very different from C and Java. But learning a functional programming will help you see different ways of looking at a problem. Even if you never program in Haskell professionally, knowing a functional programming language will make you a better Java or C programmer. And it seems that functional programming is the wave of the future, so it's a good skill to have.
You will find the Haskell community to be one of the friendliest and most helpful programming communities around (user2339071's reaction notwithstanding). So feel free to ask questions. Stack Overflow is not the best place for questions that require an opinion, but it's great when you have a piece of code you need help with.

Possible optimizations in Haskell that are not yet implemented in GHC? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
So, purely functional languages have their own class of potentials due to the clear separation between pure and impure code. I have seen several features that are somewhat simpler to implement in Haskell like Nested Data Parallelism or Stream Fusion.
My question is, what are other improvements/optimizations that are more or less unique to Haskell in terms of feasibility/simplicity but not yet implemented? (I mostly care about GHC, but also love to hear about others)
One optimization I'd love to see in GHC is supercompilation. That seems unlikely in the near-future of GHC, though, because it's whole-program optimization, and GHC is very focused on module-at-a-time compilation.
Basically, supercompilation is executing as much of a program as possible at compile time. It naturally subsumes inlining, deforestation, specialization, and any number of other techniques. Early experimental results have been promising, but it's a very expensive process. It's hard to see it being a practical optimization, but the concept is ridiculously awesome.
Another issue that SPJ states in his paper on modular supercompilation is combining supercompilation with unboxing. Possibilities for unboxing in supercompiled program are significantly reduced. This causes decrease in performance in comparison with unoptimized program passed through GHC strict-analyser/unboxer. See http://research.microsoft.com/en-us/um/people/simonpj/papers/supercompilation/
Another powerful but also "not yet ready for production use" technique is worker-wrapper transformation.

Reference of similar functions between Programming Languages [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm wondering is there is a compiled knowledge base of similar functions or functionalities between several programming languages. The reason I'm asking this question is due to the fact that one is learning a new programming language and has extensive knowledge of another, it's often difficult to know or imagine the correlation of functions between those two languages.
Obviously, if such reference exists, it would make learning a new language much easier since one only had to lookup the similar function and eventually memorize it.
Rosetta Code - user-edited wiki focused on implementing tasks in different languages
Syntax across languages - more focused on syntax
Wikipedia: Comparison of programming languages (basic instructions)
Syntax across languages is the best one. It catalogs control structures, data types, libraries, comments, and much more. Includes information about Delphi, SML, OCaml, Java, Smalltalk, C++, Ruby, Perl, Python, Lisp, PL/I, PHP, EmacsLisp, and VisualBasic.
The original wiki is quite good because its a free flowing discussion(It's not meant to be a rule based encyclopedia like wikipedia) of programming, which with its focus on history, meandering ways, flame wars, and language fanboyism (all in good fun) tells a lot about how features x in language A is basically/better/sort of equivalent to feature y in language B.

Resources