Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there native compilers for functional programming languages [closed]

Joel Spolsky praised native-code versions of programs that have no dependencies on runtimes.

What native-code compilers are available for functional languages?

like image 880
Евгений Avatar asked Sep 19 '08 19:09

Евгений


People also ask

Are functional programming languages stateless?

Functional programming has many advantages, such as: Functional program code is bug-free or less error-prone code because the functional program is stateless and there are no side effects. The advantage of this is that the function doesn't then change anything outside the function.

Why functional languages are not widely used?

Functional programming is less popular because no major successful platform has adopted a functional language as the preferred language. I don't buy that functional languages are unpopular because they are unintuitive. Losts of stuff in JavaScript is highly unintuitive.

What is the purest functional programming language?

As one of the purest functional programming languages, Haskell has reportedly led many developers to transform the way they approach programming in general and helped improve their overall abilities as programmers.

Does each computers have their very own compilers for specific languages?

Different languages have different compilers. Compiler is written in some other language not every time, for java the compiler is written in C.


2 Answers

This post is really quite unclear. The question appears to be "Are there compilers for functional languages which can produce native executables without the need to install additional software?"

The answer, generally, is yes. For example, Haskell has a compiler that produces native binaries. Many other functional languages have similar compilers.

like image 165
Stephen Deken Avatar answered Sep 28 '22 07:09

Stephen Deken


Yeah, also:

ocamlc is the bytecode compiler, and ocamlopt is the native code compiler. GCL compiles Common Lisp to native binaries.

There isn't anything for F# since, for what I am aware of, .NET doesn't have a native compiler, like Joel mentions. Actually, CSML can be used to call C# from ocaml, uhh, not sure if you can compile this down to native code --it doesn't seem likely-- although the documentation alludes to it, yet it is very incomplete.

like image 39
nlucaroni Avatar answered Sep 28 '22 05:09

nlucaroni