← Back to context

Comment by zarakshR

17 hours ago

I don't see how:

Racket:

  > (define (fact n)
      (if (= n 1)
          1
          (* n (fact (- n 1)))))
  > (fact 6)
  720

OCaml:

  # let rec fact = function
      | 1 -> 1
      | n when n > 1 -> n * (fact (n - 1))
    in fact 6;;
  - : int = 720

Whenever someone complains about not being able to use a slightly different syntax, I assume they just don't have any neuroplasticity anymore.

  • I think syntax matches with our brains or not. I think anyone is capable of learning any syntax. The question is whether they want to. At some level, programming is art.