Benefits and uses of a functional programming language -


possible duplicate:
why functional languages?

i began programming c/c++, vb, , python - imperative languages. took course programming languages , learned first functional language - ocaml. terrible.

syntax , other horrors aside, ocaml took imperative thought process , threw out window. frustrating. insisted done functionally done imperatively. thought of functional programming imperative programming without limb (side effects). in response frustration, benefit professor come fpl's ability parallelize side-effect-free functions.

anyways, enough talk.

  1. what advantages fpls offer above ipls?
  2. is there can done in fpl cannot done in ipl?
  3. are there real-world examples of fpls in use, or serve academic exercises? (when real-world, mean project heavily relies on functional aspect of language , doesn't cram fpl scenario doesn't belong).

thanks,
advait

first of all, language in common use today equivalent in expressive power, imperative or functional, it's natural think can in functional language can in imperative one, because it's true.

one of nice things functional languages structure permits application of hindley-milner type inference. type system used in sml, ocaml , bunch of other functional languages. genuinely seems lead reduced rates of errors , capable of saving lot of time , energy finding bugs up-front compile errors.

the automatic parallelisation argument bit over-used, because promise hasn't eventuated. have written explicitly parallel code in functional languages , nicer, imho, doing similar in java or like.

anecdotally @ least, wouldn't first person claim learning functional language makes better imperative programmer! discomfort felt in having "imperative" thought process interrupted when using ocaml process go through. makes question assumptions , stops writing code in particular way because have done way.

as real-world use, might @ proceedings of commercial users of functional programming workshops. there large projects written in various functional languages, although of them of limited interest outside small communities. theorem provers coq , isabelle written in ocaml , sml, respectively.

whatever do, persevere. spent long time banging head against ml before things clicked. these days i'm not sure remember how java or c work, because haven't had need them in long time... use ml!


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -