Large scale code generation to mimic generic abstraction

xuanbao · · 369 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Generics is more than simple type subsitution. In C++, template specialization evolved into a set of techniques to do compile time calculation, which leads to constexpr added to the language. In D, we have static if, which supports a subset of the D language in the compile time. Even if Go 2.0 starts to support Generics, it will take some time to same level of maturity. Code generation will continue to be a possible solution for a long time. But hand-rolled code generator will have scalability issue, we can not support complex logic such as one generic function calling another one. The goal of wombat is to build a large-scale code generation framework, which supports:</p> <ul> <li>dynamic code compilation for test</li> <li>static code generation for production</li> <li>expand time calculation</li> <li>recursion</li> <li>generic container</li> <li>type inference</li> </ul> <p><a href="http://v2p.ro/generics.html" rel="nofollow">http://v2p.ro/generics.html</a></p> <p><a href="https://github.com/v2pro/wombat/tree/master/fp" rel="nofollow">https://github.com/v2pro/wombat/tree/master/fp</a></p>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

369 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传