News for hackers. Stuff that matters.
Re:An Apologia of Lazy Evaluation by runeks on Sunday March 26, 2023 @01:45PM (#35317215)
> What I meant was that the space the program will use isn't defined by the language itself and can't be known at compile time.

You can know the space usage (in relation to input size) of some Haskell programs at compile-time — e.g. if you use a constant-memory streaming abstraction.

I don’t know much about Rust, but I don’t think it guarantees known space usage of all possible programs at compile-time.

Re:An Apologia of Lazy Evaluation by ummonk on Sunday March 26, 2023 @03:23PM (#35318479)
Don't know if Rust has this ability, but SPARK (a subset of Ada for safety-critical code) does have the ability to guarantee known space usage, as well as guarantee that a program will terminate.