News for hackers. Stuff that matters.
Re:Dynamic programming in Haskell: automatic memoization by lewtds on Tuesday June 20, 2023 @02:39AM (#36400503)
Certain logic programming languages like SWI-Prolog [0] and Picat [1] have this built-in.

[0]: https://www.swi-prolog.org/pldoc/man?section=tabling-memoize [1]: http://retina.inf.ufsc.br/picat_guide/#x1-210001.5

Re:Dynamic programming in Haskell: automatic memoization by thesz on Tuesday June 20, 2023 @05:37AM (#36401664)
That's main Haskell strength: there often is a library in Haskell for what is language feature in other languages.
Re:Dynamic programming in Haskell: automatic memoization by cubefox on Tuesday June 20, 2023 @08:02AM (#36402830)
Not sure this is a strength, it sounds like Java.
Re:Dynamic programming in Haskell: automatic memoization by EdwardDiego on Tuesday June 20, 2023 @08:09AM (#36402885)
Could well be a strength of Java ;)
Re:Dynamic programming in Haskell: automatic memoization by thesz on Tuesday June 20, 2023 @02:31PM (#36408429)
Yes, it is a strength.

You may want a new control operator. In case of, say, Java, you go and ask language developers. In case of Haskell, you write a function or a bunch of functions. "if-then-else" can be implemented in Haskell as a function, for one example. Myself, I created a lot of these control operators when I worked with Haskell. I also used a lot of operators defined by others.

Re:Dynamic programming in Haskell: automatic memoization by cubefox on Tuesday June 20, 2023 @03:08PM (#36408966)
This is cool, but in practice there are restrictions on syntax and grammar which limit what you can do compared to native "syntactic sugar".