Why would i learn erlang or haskell? [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
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.

Related

Learning functional programming after other programming paradigms [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
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#... :(

Why use advanced compiler techniques over simple string manipulation in small compilers? [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
What advantage is using (what I understand as) advanced compiler techniques like special grammar, AST, etc over simple string manipulation for making very small programming languages? I'm interested in compiler design and don't know wether I should learn all of this compiler theory if I'm only going to make small and simple languages. I know that as I start to make bigger languages I will probably have to use parser generators and the like, but until then should I bother?
You should definitely know what an AST is and how to build one. Even if you use parser generators later on. I mean, how can you be interested in compiler design but not in grammar and syntax trees? It always pays off to learn how stuff works under the hood, rather than taking it as magic.
And seriously, parsing anything else than Whitespace or Brainf*ck is awful with string manipulation as soon as it gets more complicated...

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.

How would you implement a functional programming language? [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 6 years ago.
Improve this question
In functional paradigm, a function is a primary 'control structure'. For eg., the + operator is also treated as a function and you can pass them around like any other 'objects'. I was wondering that if i had to implement a toy functional language, would i implement simple functions as true functions (i.e. translate + into a callable routine) or translate them into normal instructions that would be placed 'inline' into the translated code. But then, with the second strategy, would i be able to pass them around and apply them partially like in haskell? What are your thoughts on implementing/translating functions as a central idea in a functional language?
I can recommend the PJL book. I wrote a compiler with help from it (in 1989-90, in Prolog) and the book is a very good introduction to the subject.
It might be dated (written in 1987, 30 years ago) but it still covers the basics very well. It is, however, completely focused on lazy languages like Haskell. At the time Haskell did not exist and the book uses LML or Miranda, a predecessor language but the languages are very close.

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