Hacker News new | past | comments | ask | show | jobs | submit login

Computer programs needn’t be Turing Complete. There are plenty of useful languages that are not, the Relational Algebra being example 1, which is equivalent to First Order Logic, and is in a pretty strong sense about as good as you can do without Turing Completeness.

The entire industry’s understanding of the power of the relational model has been destroyed by SQL, which is the largest foot gun of so many in our industry.

In fact, much more of most business applications (hell, just about all applications) can and would profitably be expressable in First Order Logic. The resulting programs would be simpler, easier to modify, easier to get correct, and other things besides.

Much of what Bret Victor has shown could be expressed in First Order Logic.

Would you still want Turing Complete traditional programming languages? Of course. But both programmers and non-programmers would benefit from being able to express more of programs using the sorts of declarative idioms that Bret Victor has shown and that the relational model provides.




> The entire industry’s understanding of the power of the relational model has been destroyed by SQL, which is the largest foot gun of so many in our industry.

When people say stuff like this, I think of traditional post&beam construction guys complaining about the way that stud framing has destroyed the industry's understanding of the power of "real construction". Whether or not that's true, stud framing has been used to build homes for on the order of a million times more people than post&beam. Perhaps it is true that stud framing obscures a deeper understanding of the nature of wood, joinery, loads and so forth, but sometimes the point is just to build a shit ton of houses, cheaply, efficiently, effectively, knowing that changes in requirements will make most houses largely redundant before (most) stud framed houses are gone.

SQL: shallow, weak, wrong, incomplete, misleading, and how the world gets built.


Yes, I think we should build more DSL toolkits. Turing-complete languages are too expressive.

If we had a meta-language like Lisp or ML that had very good capabilities to quickly develop DSLs with very clean restricted semantics for every particular component of a big system, and tooling to automate proofs for said restricted DSLs, software would be more robust and easy to develop.

Alan Kay was pursuing parts of this vision at Viewpoints Research Institute. Racket is also very focused on DSLs. Any others?


90%[1] of popular DSLs turn into Turing-complete languages over time. And they usually end up as very badly designed Turing-complete languages.

[1] Or some other made up, but still very high number.


Are there languages today that embody first-order logic (perhaps Prolog)?


Datalog: https://en.m.wikipedia.org/wiki/Datalog

Prolog is actually Turing complete.


Indeed, sir.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: