Re:Ask HN: How would a goal-oriented programming language lo...
by brudgers on Monday April 30, 2018 @11:53AM
(#16959633)
Sorry. I guess I don't see how a goal oriented language would work without declaring the goal and declaring the conditions under which it must be achieved.
[ Parent
| on HN ]
Re:Ask HN: How would a goal-oriented programming language lo...
by coldtea on Tuesday May 01, 2018 @05:38AM
(#16965641)
Did you read the article the poster is reffering to, though?
It specifically mentions that the kind of "missing paradigm" looked for is not one of the declarative ones we currently have (SQL, Prolog, etc) because those fall into the Evaluate + Consequent combo.
So, he gives 3 paradigms:
FunctionalProgramming -> Evaluate + Mechanism (list of instructions)
ImperativeProgramming -> Execute + Mechanism
LogicProgramming/ConstraintProgramming -> Evaluate + Consequent (i.e. towards a consequent (result) based on constraints) [this is where declarative falls).
So, the "goals oriented" language he defines as the missing: Execute + Consequent pair.
Re:Ask HN: How would a goal-oriented programming language lo...
by brudgers on Tuesday May 01, 2018 @09:17AM
(#16966767)
Yes. And the Hacker News guidelines.
Re:Ask HN: How would a goal-oriented programming language lo...
by coldtea on Tuesday May 01, 2018 @09:58AM
(#16967046)
I would expect something more substantial for my "several paragraphs with summary and references" response than "the HN guidelines say to not question whether another has read TFA" then...
Re:Ask HN: How would a goal-oriented programming language lo...
by brudgers on Tuesday May 01, 2018 @10:11AM
(#16967135)
Not going to feed you.
Re:Ask HN: How would a goal-oriented programming language lo...
by phaedrus on Monday April 30, 2018 @04:09PM
(#16961798)
An imperative goal oriented language can be implemented as a staged language using lambdas. The first stage answers the question, "What are the subgoals?" The second stage applies a subgoal to a candidate solution.
Logic-programming style control flow can be implemented on top of these two primitives.
Re:Ask HN: How would a goal-oriented programming language lo...
by snrji on Monday April 30, 2018 @05:26PM
(#16962543)
Yes, I agree. But in the article I shared, they say that this goal-oriented language would be somehow "imperative" in the sense that you would be telling to the computer concrete things to do, just from a (much) higher abstraction level.
Re:Ask HN: How would a goal-oriented programming language lo...
by brudgers on Tuesday May 01, 2018 @01:58PM
(#16969524)
The C2 page is a wiki (the orginal). The page contains several viewpoints by different authors. Among them is the view that the division into a 2x2 table is incomplete/incorrect/of-limited-utility. For me, the relationship of declarative languages to the ordinary usage of "goal" is much stronger (for me at least) than the vague terms used to create the 2x2 table. To put it another way, I find the premise dubious. For me, it is useful to keep in mind the truth table of conditional statements in modal logic:
a -> b
b = T b = F
+--------+--------+
a = T | T | F |
+--------+--------+
a = F | T | T |
+--------+--------+
For me, the statement about there being some fourth category is trivially true because the division into two categories is false.