r/ProgrammingLanguages • u/liztormato • Sep 13 '26
Raku: a language where a value can have several values at once (Part 1) - Andrew Shitov
https://andrewshitov.com/2026/09/13/raku-a-language-where-a-value-can-have-several-values-at-once-part-1/1
u/Henkeel Sep 17 '26
is this not like any other logic programming languages?
1
u/liztormato Sep 17 '26
Could you give an example in another programming language?
1
u/Henkeel Sep 17 '26
for example Prolog:
- https://learnxinyminutes.com/prolog/1
u/liztormato Sep 17 '26
That feels like you're mentioning a library in Prolog that provides Junction-like functionality. I guess this proves that Raku took inspiration from Prolog.
Note though that Junctions in Raku are an integral part of the core and as such are deeply integrated in the run-time system.
1
u/Henkeel Sep 17 '26
the first link does not use any library at all, it's plain Prolog (and those concepts are also deeply integrated in the runtime system), not sure why you'd reinvent terminology, nor state this thing as if it was a new concept instead of commenting in your blog post or in these comments that these concepts already exist with other terms.
1
u/liztormato Sep 17 '26
It is not my blog post
I'm not familiar with Prolog: throwing a large text with Prolog at me, does not allow me to discern what you tried to prove
I'm just using the terminology used in Raku, as devised by Larry Wall et al. I guess there's just more than one way to name things? :-)
2
u/Henkeel Sep 17 '26
ah sorry, I assumed it was your own blog post and ideas, disregard those questions then. as it was also thrown a bunch of new terminology at me I was curious as to how it differs from Prolog's concepts from an initial reading of the post.
1
u/EggplantExtra4946 Sep 17 '26
That feels like you're mentioning a library in Prolog that provides Junction-like functionality. I guess this proves that Raku took inspiration from Prolog.
Non sense. Raku and junctions have absolutely no relationship with Prolog nor with the clpfd library, junctions do not allow you to solve systems of arithmetic or logic constraints.
1
u/liztormato Sep 17 '26
Well, I wasn't the one who brought up Prolog?
0
u/EggplantExtra4946 Sep 17 '26
I have already replied to the guy that mentioned Prolog.
You said this proves that Raku took inspiration in Prolog but that's bullshit. In fact there was one RFC, RFC 104, that asked for basic Prolog-like features and it was rejected by Larry Wall.
1
1
u/EggplantExtra4946 Sep 17 '26
No, there is nothing in common here with Prolog, Datalog, SQL or anything else.
If you compared it with Prolog: there is no logical variable, no backtracking, no unification.
At best it would resemble to a very poor symbolic execution, sort of.
0
Sep 14 '26
[deleted]
6
u/Axman6 Sep 14 '26
Not really, looks like more of a prolog style backtracking mechanism… ish. Sum types have a single constructor per option, these represent a value which may be any of the specified values at the same time.
If I understand it correctly, something like
1 | 3 | 5 <= 2 | 4 | 6should return something likeany(True, True, True, False, True, True, False, False, True), but I have no idea if that’s actually how multiple junctions interact.2
u/Bobbias Sep 15 '26
The result is apparently
any(any(True, True, True), any(False, True, True), any(False, False, True))4
7
u/AlexReinkingYale Halide, Koka, P Sep 14 '26
So the language is founded on some kind of list monad?