gpt4 book ai didi

c++ - 用 C++ 实现的类型推断

转载 作者:IT老高 更新时间:2023-10-28 23:17:08 27 4
gpt4 key购买 nike

是否有 C++ 中的实现,Damas-Hindley-Milner风格类型推断,最好使用现代 C++ 技术?

最佳答案

这里是 my implementation of Hindley-Milner type inference in C++11 ,基于 Python code by Robert Smallshire , Scala code by Andrew Forrest ,Nikita Borisov 的 Perl 代码和 paper "Basic Polymorphic Typechecking" by Cardelli .

它大量使用了 boost::variantboost::apply_visitor

关于c++ - 用 C++ 实现的类型推断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8774854/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com