Besides a declarative language, is SQL a functional language?

后端 未结 8 1314
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-29 03:22

Why yes or why not?

8条回答
  •  自闭症患者
    2020-12-29 04:12

    There's no single true definition of what a functional language is (or for that matter, what a procedural or object-oriented one is).

    But I can't really think of much that points to SQL being functional. It doesn't have functions, it doesn't have recursion, it doesn't have closures, it doesn't have nested functions, it doesn't have functions as first-class types.

    A more commonly asked question is whether SQL is a programming language at all. It's not turing-complete.

提交回复
热议问题