News for hackers. Stuff that matters.
Re:Write code. Not too much. Mostly functions. by bob1029 on Monday December 21, 2020 @09:31PM (#25502226)
Problem domain = Shopping, Banking, Coffee Shop, Factory, Airplane

Dimension = Customers, Accounts, Users, Widgets, Inventory

Higher-Order Logic = combining basic functional building blocks in order to compose more complex functionality. SQL enables direct, declarative access to the whole space of higher-order functions. E.g. You want the list of widgets made 3 quarters ago but scoped to one factory line, and only when a certain rotation of employees was on the factory floor? You got it. That's like 10-15 lines of SQL.

Re:Write code. Not too much. Mostly functions. by garethrowlands on Tuesday December 22, 2020 @10:03AM (#25506844)
A higher order function is a function that takes another function as a parameter or returns a function as its result. Famous higher order functions include "map" and "filter", for example. Javascript, for example, uses higher order functions all the time. See [1].

The term "higher order logic" typically means program logic that uses higher order functions. An object-oriented programming style is inherently higher order because objects typically contain functions and are passed to methods.

The term "higher order logic" can also mean a system of logic that allows statements about logical statements. [2]

[1] https://en.wikipedia.org/wiki/Higher-order_function [2] https://en.wikipedia.org/wiki/Higher-order_logic

Re:Write code. Not too much. Mostly functions. by chj on Monday December 21, 2020 @10:15PM (#25502461)
Thanks. That is clear.
Re:Write code. Not too much. Mostly functions. by carapace on Tuesday December 22, 2020 @12:46PM (#25508991)
BTW all those terms are like a century old.
Re:Write code. Not too much. Mostly functions. by chj on Wednesday December 23, 2020 @08:27PM (#25524275)
I only saw them occasionally, never tried to understand them before.