Modest opinions  
by a humble autodidact

2008年10月21日

摘要: 今天被一个超级trivial的格式问题搞到抓狂。程序中有这样一个match结构:match ... with| ... -> ...| ... -> ...这以后不论写一行什么编译器都抱怨格式错误。原来是#light格式的缩进规则所致,应该这样写:match ... with| ... -> ...| ... -> ...注意每个竖线前都要空一格。如果没有空格,编译器会认为... 阅读全文
posted @ 2008-10-21 17:23 yushih 阅读(239) 评论(1) 推荐(0) 编辑
 
摘要: Channel9上一个叫Charles的说得好:One of the truly great things about JAOO is that it is not a product-focused conference: it's about programming first and foremost and enables the sharing of perspectives and i... 阅读全文
posted @ 2008-10-21 11:25 yushih 阅读(707) 评论(0) 推荐(0) 编辑
 
摘要: Ruby没有C/C++/C#风格的enum。没有关系,上meta-programming,这是熟练Ruby程序员的第一反应,因为Ruby也没有struct,用meta-programming造出的struct一样好使。很好很强大的想法。但是如果我们想Keep It Simple呢?一个小小的parallel assignment功能就解决问题:module WeekDay Mon, Tue, We... 阅读全文
posted @ 2008-10-21 00:21 yushih 阅读(469) 评论(0) 推荐(0) 编辑