Earlier quoted context omitted.
No. You're thinking imperatively. The pure form would express something like: "given the property sorted(s) defined in this way, let s be a set such that for all elements e of s, e is an element of the program input. Then let the output of the program be the list l such that sorted(l) is true.
>No. You're thinking imperatively. The pure form would express something like: >given the property sorted(s) defined in this way "Prompt SET" >let s be a set such that for all elements e of s, e is an element of the program input. ... such that sorted(l) is true. "SORT SET" >Then let the output of the program be the list l Display SET. You've changed the wording and grammar, but you haven't stated anything different.
I want to fix programming
161–163 of 163 posts
Re: I want to fix programming
#162Earlier quoted context omitted.
I'm not convinced you can really separate those things in a practical context. Inevitably you end up with a leaky abstraction and the opaqueness of what's actually going on makes it harder to diagnose. I think declarative is the right default, since it shows the intent over the mechanics, but I deeply distrust any system that won't let me be very specific about the mechanics if I need to be.
The problem is not that SQL is slow, the problem is people push the system until it becomes slow. It's just as easy to write 'JOIN this billion row table with that billion row table' as it is to forget how hard that is. We may complain that creating indexes is painful, but take some huge complex and slow query and try recreating it in C++ correctly and at least as fast and you quickly enter a world of pain. PS: It's…
If you can change how you phrase a query and get different performance, while keeping the same semantic meaning, your language isn't just leaking, it's hemorrhaging. It may still be useful, perhaps world-changingly so, but it's a perfect example of the dangers of declarative programming.
As to 'try making it in C++': with a library for doing so with as much maturity as SQL? Sure. It'd probably be reasonably simple, if more verbose. And when it inevitably runs slowly, you can infer the reason for why A runs faster than B relatively simply, because it's doing precisely what you told it to do.
Re: I want to fix programming
#163The problems the OP wants to solve are formally undecidable and reducible to the halting problem. 1. Given a formal specification, find a program that meets the specification. 2. The apparently simpler problem of checking whether a given program meets a specification. Both are undecidable. That said, there is an extensive literature on practical approaches to this problem. They generally suffer from intractability. h…
I have a question about this Christian, assume that we can accurately model an atom with a computer and then we uploaded a human into the computer, wouldn't the computer then be able to either solve the problem or report that the problem is unsolvable? I understand the halting problem but isn't there some kind of meta check that a sufficiently complex system could output?
n = 4;
goldbach = true;
while(goldbach) {
goldbach = isSumOfTwoPrimes(n);
n += 2;
You just have to prove the Goldbach Conjecture. :-)