• ifelse
    2022-09-23 来自浙江
    学习打卡
    
    
  • qinsi
    2021-10-02
    TypeScript的union type就是Haskell ADT里的sum type,不过是untagged,所以在判断类型上有诸多不便。TypeScript也可以定义product type: ```typescript type pair = [string, number] ``` 因为TypeScript支持值类型,又因为TypeScript的类型系统是图灵完整的,所以可以像C++的模版元编程一样,做出一些“滥用”的行为,比如你甚至可以让编译器帮你解析html: https://github.com/g-plane/type-gymnastics/blob/master/src/spec-compliant-html-parser/index.ts
    
    
  • 奋斗的蜗牛
    2021-09-29
    赞,类型系统的实现一直看不太明白,是个难点
    
    
  • quanee
    2021-09-29
    老师, 我们写的语言最后能自举吗?
    共 1 条评论
    