Uiversale Progammiersprache? Englisch!

by admin 6. June 2007 22:38

Phil Haack schreibt über die universelle Programmiersprache und vergleicht c# und ruby miteinander mit folgendem Beispiel:

Ruby: 

20.minutes.ago

C#:

DateTime.Now.Subtract(TimeSpan.FromMinutes(20));

C# 3.0 using Extension Methods:

20.Minutes().Ago();

 

Wobei Phil Haack natürlich verschweigt das mit  c# soetwas problemfrei zu implementieren ist:

new Time(20).minutes().ago()

Martin Fowler spricht vom "Fluent Interface". Gerade für Konfiguration und Setups mag ich gar nichts anderes sehen als diese ausdruckstarke und einfach zu lesende Art von Schnittstellen!

enjoyed the post?

Tags:

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About Oliver

shades-of-orange.com code blog logo I build web applications using ASP.NET and have a passion for javascript. Enjoy MVC 4 and Orchard CMS, and I do TDD whenever I can. I like clean code. Love to spend time with my wife and our children. My profile on Stack Exchange, a network of free, community-driven Q&A sites

About Anton

shades-of-orange.com code blog logo I'm a software developer at teamaton. I code in C# and work with MVC, Orchard, SpecFlow, Coypu and NHibernate. I enjoy beach volleyball, board games and Coke.