Hacker News new | ask | show | jobs
by JoeAltmaier 4058 days ago
Cute, but not quite. Those are still executed in some order. Not like algebra which is a set of expressions that are all true over all time.
5 comments

>Those are still executed in some order.

Not really. E.g. there's no ordering in function composition that isn't also in high school math. Also, you shouldn't depend on e.g. maps processing elements in a given order.

My impression is that statement ordering is easier for mediocre but competent programmers than it is for excellent programmers. The reason is that writing correct imperative code is non-trivial, but writing correct-y imperative code is pretty easy. So someone who's carefully thinking things through while learning will have a more difficult time with simple assignments, because -- at least while learning -- they're essentially trying to construct the correctness proof in their head. And that's pretty hard for imperative code.

Confused. Array iteration is sequential, and common in every functional language, right?
Then declarative programming, maybe? You don't care as much about execution order when doing declarative programming like Prolog. (unless you're writing code "procedural-style")
That's it! He could have found a niche there.
Given that I have a hell of a time wrapping my own (algorithmic-oriented) mind around that kind of programming, that's not necessarily a weakness. It is an interesting contrast in ability though.
Those are still executed in some order.

in all languages? i don't think so.

    def x = y where
      y = a * b
      a = 21
      b = x
in all non-declarative languages.
Functional means that sequence doesn't matter. Haskell is functional, Lisp largely isn't.
Functional means that sequence doesn't matter. Haskell is functional, Lisp largely isn't.