百科问答小站 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.



  

相关话题

  什么是函数式编程,它解决什么问题? 
  正在工作的程序员,生活状态什么样? 
  计算机视觉顶级会议论文中比较适合初学计算机视觉的人做的复现实验有哪些? 
  Linux 图形界面的显示原理是什么? 
  DOS 界面是如何制作的? 
  为什么程序员有那么多过劳死的,知乎上还是乐此不疲的劝人转计算机专业? 
  有没有工具能找出程序01代码相同的部分, 精简掉相同部分,只操作他们的地址码来让程序依然能运行? 
  python如何将变量名转化为同名字符串? 
  有哪些编程上的中文术语让人困惑,但是看英文就一目了然的? 
  在北美(加拿大,美国)IT程序员是青春饭么? 

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





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