Any advatage using the ML programming language?

  • #1
been learning ML programming, just fun to learn new things, what this ML programming used for anyways? how is this better that C or C++?
 

Answers and Replies

  • #2
DavidSnider
Gold Member
500
141
C and C++ are known as imperative languages while ML is a functional language.

You can say that a C program "executes instructions" while an ML program "evaluates expressions".

Functional languages tend to treat programs as mathematical functions that don't have mutable data or state. This is to avoid functions having "side effects".

So in C, you can call a function twice with the same input data and get back two different results depending on the current state of the program. In ML a function always returns the same result for a given input regardless of the context. (Well, not *always* as ML is not a purely functional language, but usually).

This is said to make reasoning about the programs behavior easier.
 

Related Threads on Any advatage using the ML programming language?

Replies
12
Views
8K
Replies
7
Views
4K
Replies
14
Views
786
Replies
26
Views
6K
Replies
11
Views
1K
Replies
3
Views
2K
  • Last Post
Replies
2
Views
842
  • Last Post
Replies
1
Views
771
Top