整理我的代码 [英] Organizing my code

查看:152
本文介绍了整理我的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

 

我还没有读完Don Syme的书,所以也许我应该读一些东西,但是...随着我的小项目学习,我看到我写了很多函数,这些函数通常是其中的一部分更大的一个,等等...所以我最终要么 具有很多功能的大文件,或者具有很多子功能的大文件.无论哪种方式,我都觉得文件难以阅读...除了对代码进行模块化之外,组织大量创建的函数的策略是什么? 有什么提示吗?任何文章或只是计划建议都可以;).

I haven't yet finished reading Don Syme's book so there may be something there I should read but... as I'm learning with my little project, I see I write lots and lots of functions which generally are part of a bigger one, etc... so I end up with either a large file with lots of functions one after the other or with big functions with lots of subfunctions in it. Either way I find the file hard to read... Apart from modularizing the code, what's your strategy to organize the tons of functions that are created? Are there any tips? Any article or just plan advice will do ;).

 

谢谢!

推荐答案

虽然不完全是关于组织的,但您可能会发现此帮助:
While not purely about organization you might find this helpful: http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/fsharp-component-design-guidelines.pdf


这篇关于整理我的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆