Skip to content

Commit

Permalink
Update post
Browse files Browse the repository at this point in the history
  • Loading branch information
MgaMPKAy committed Mar 4, 2014
1 parent e84427e commit e6636ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion posts/an-introduction-to-the-expression-problem.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1>Expression Problem简介</h1>

<section id="article-content">
<p>今天白天停电,所以看了一下设计模式,看到Vistor的时候突然想起Expression Problem,Vistor模式可以在OO里放弃数据类型的扩展来得到方法扩展,还是不能解决Expression Problem。</p>
<p>最近Reddit Haskell上也有讨论Expression Problem<a href="http://www.reddit.com/r/haskell/comments/1quhrl/from_object_oriented_programming_to_functional/" title="From Object Oriented Programming to Functional Programming - Inheritance and the Expression Problem">3</a>,最吸引我的是codata和OCaml的polymorpic variants,已经遇到很多次了。</p>
<p>最近Reddit Haskell上也有<a href="http://www.reddit.com/r/haskell/comments/1quhrl/from_object_oriented_programming_to_functional/" title="From Object Oriented Programming to Functional Programming - Inheritance and the Expression Problem">讨论Expression Problem</a>,最吸引我的是codata和OCaml的polymorpic variants,已经遇到很多次了。</p>
<p>下面是一年前在QQ空间里的一篇关于Expression Problem笔记。</p>
<hr />

Expand Down
4 changes: 2 additions & 2 deletions posts/nominative_and_structural_type_systems.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ <h1 id="nominative类型系统">Nominative类型系统</h1>
<h1 id="structural类型系统">Structural类型系统</h1>
<p>结构类型系统中,通过对象的结构来判断等价和子类关系,对象的结构也就是一些属性和方法,只要两个对象有相同的字段,它们的类型就是等价的。对象A包含对象B的属性,那么对象A就是对象B的子类(子类对父类进行扩展,可增加属性)。</p>
<p>我接触过的,也就只有Go的interface了。</p>
<p><del>Duck typing和结构类型不同,Duck typeing是在运行时进行检测。</del>Duck typing也是一种结构类型,运行时检测也不是必须的</p>
<p>Duck typing和结构类型不同,Duck typeing是在运行时进行检测。<del>Duck typing也是一种结构类型,运行时检测也不是必须的</del></p>
<h1 id="vinly">Vinly</h1>
<p>Vinly在Haskell里实现了结构类型,以后继续。</p>
<h1 id="参考">参考</h1>
<ol style="list-style-type: decimal">
<li><a href="http://en.wikipedia.org/wiki/Nominative_type_system">Nominative type system</a></li>
<li><a href="http://en.wikipedia.org/wiki/Structural_type_system">Structural type system</a></li>
<li><a href="http://www.jonmsterling.com/posts/2013-04-06-vinyl-modern-records-for-haskell.html">Vinly: Modern records for haskell</a></li>
<li><a href="http://www.jonmsterling.com/posts/2013-04-06-vinyl-modern-records-for-haskell.html">Vinyl: Modern records for haskell</a></li>
<li><a href="http://www.reddit.com/r/haskell/comments/1buh5y/vinyl_modern_records_for_haskell/">Reddit上关于Vinly的讨论</a></li>
</ol>
</section>
Expand Down

0 comments on commit e6636ab

Please sign in to comment.