百科问答小站 logo
百科问答小站 font logo



什么是 Type Driven Development ? 第1页

  

user avatar   be5invis 网友的相关建议: 
      

EB 那本书里的吧,一言以概,Test-driven development 用测试约束程序行为,Type-driven 用(复杂的)类型系统约束程序行为,让编译器强迫你按照某种「正确」方式实现出来。

为什么其他语言不这么干呢?因为它们的类型机制没有强到可以描述逻辑。

Type-driven development is a style of programming in which we write types first and use those types to guide the definition of functions. The overall process is to write the necessary data types, and then, for each function, do the following:
- Write the input and output types.
- Define the function, using the structure of the input types to guide the implementation.
- Refine and edit the type and function definition as necessary.



  

相关话题

  为什么轮子哥会那么火? 
  有什么理论复杂但是实现简单的算法? 
  计算机(CS)专业大学生怎样平衡绩点和编程能力? 
  初中文凭可以学习编程吗?如果可以,是去靠谱的培训机构还是自学?学习方向都有哪些?就业环境如何? 
  怎样成为全栈工程师(Full Stack Developer)? 
  Minecraft开发圈内应不应该开发出降低门槛的程序? 
  把BAT的机房炸掉,公司是不是就垮了? 
  你的程序员学习之路是怎样的?你现在对于编程有哪些感想? 
  有多少人知道汉诺塔其实应该叫河内塔? 
  有没有人开发自我监测统计软件? 

前一个讨论
为什么 C 语言 sqrt 函数参数不支持 int?
下一个讨论
带着100台iPhone X突如其来穿越回1997年,怎样靠这个(严格限制)发家致富(不要抖机灵)?





© 2025-06-04 - tinynew.org. All Rights Reserved.
© 2025-06-04 - tinynew.org. 保留所有权利