alantech / alan

Autoscalable Programming Language
https://alan-lang.org
MIT License
305 stars 10 forks source link

Implement 'hash' and 'clone' functions #807

Closed dfellis closed 1 month ago

dfellis commented 1 month ago

Resolves #753

Mostly. The hash function has some serious issues for more complex types that need to be addressed. Left comments on this for now. It may become an automatic Derived function for efficiency's sake, walking the CType tree to figure out what operations to perform.

clone should be 100% done, assuming that all complex types have #[derive(Clone)] defined, which the ones generated by the compiler should be.