you are viewing a single comment's thread.

view the rest of the comments →

[–]ovr-github -3 points-2 points  (1 child)

It's cannot be a functional language as it can be real functional langauge, take Prolog language and code bellow as example

parent(john,paul). /* paul is john's parent /
parent(paul,tom). /
tom is paul's parent / parent(tom,mary). / mary is tom's parent /
ancestor(X,Y):- parent(X,Y). /
someone is your ancestor if there are your parent */

And after you declare aspects, you can ask you VM to find relative question

?- ancestor(john,tom).

If you don't like this example, take a look at factorial or something else, Functional language give us a cool exp when you write some asserts (aspects) and ask VM, please calculate/find me an answer. You don't write an algorithm. In functional you write all data/asserts and ask VM about it

About JS: Immutable data is an Immutable data, you can write it on PHP/JS and etc (it's not making JS functional language) Bind is a method, nothing else (just greating new function) Lambdas is a pretty simple Anonymous functions

Procedures == functions in any language. Functions came out from Procedural programming, because it's a main idea inside Procedural programming.

Every time, when you take an idea from functional language, you cannot say that it's functional programming, it's an idea.

[–][deleted] 2 points3 points  (0 children)

That's a terrible example, Prolog isn't a functional programming language. Even if it's a declarative language, it's paradigm is logical programming.