Any advatage using the ML programming language?

  • #1
chrisalviola
80
0
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
502
144
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.
 

Suggested for: Any advatage using the ML programming language?

Replies
12
Views
8K
Replies
7
Views
4K
Replies
11
Views
2K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
10
Views
5K
Replies
14
Views
1K
  • Last Post
Replies
18
Views
3K
  • Last Post
Replies
15
Views
4K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
18
Views
9K
Top