mthom / scryer-prolog

A modern Prolog implementation written mostly in Rust.
BSD 3-Clause "New" or "Revised" License
2.01k stars 118 forks source link

Consider corroding all lists! #489

Open GregDavidson opened 4 years ago

GregDavidson commented 4 years ago

Kudos to you for realizing that character strings can behave as Lists (the high level datatype) without being implemented as linked lists (a usually poor implementation strategy on modern systems). I'm assuming that your "difference lists" are bounding pointers into an array slice, a natural Rust strategy. I'm wondering where else in Scryer-Prolog you could implement Lists this way. Maybe everywhere? Please corrode your Prolog implementation as much as possible, the language will thank you!

mthom commented 4 years ago

I've been thinking of how to do that. I don't think there are bad semantic ramifications, but I'd have to prove it.