zlacker

[parent] [thread] 3 comments
1. dragon+(OP)[view] [source] 2024-10-14 00:28:24
> But let's instead compare the incomplete declarativeness of Prolog to a fully-imperative, zero-declarative language like Python or C#.

There's no such thing as "fully-imperative, zero-declarative language" -- at least not one as high level C# or Python -- because declarative/imperative are programming styles, which languages can make more natural but which are used with all (well, higher-level than assembly) languages.

replies(1): >>YeGobl+NV
2. YeGobl+NV[view] [source] 2024-10-14 11:40:05
>>dragon+(OP)
I think there are declarative elements in various high-level languages, e.g. Linq queries in C# so I guess it is an exageration to say "zero-declarative", but in general the level of declarative-ness is tiny compared to Prolog.

Did I misunderstand what you mean?

replies(1): >>thesz+a7h
◧◩
3. thesz+a7h[view] [source] [discussion] 2024-10-20 21:52:55
>>YeGobl+NV
Have you tried Haskell?

For example, it is possible to embed backtracking logic programming [1] into Haskell with not a big effort.

[1] https://hackage.haskell.org/package/logict

replies(1): >>illogi+WTq
◧◩◪
4. illogi+WTq[view] [source] [discussion] 2024-10-24 15:21:33
>>thesz+a7h
It sure is if you read enough "Functional Pearls" to think all you need for logic programming is some backtracking. Oh, and the cut. Because you can't control backtracking without the cut. Not if you don't understand what the backtracking is for in the first place! Mwahahaha.

Oh sorry. Did I let my schadenfreude out again?

[go to top]