Wednesday, July 7, 2010
Tuesday, July 6, 2010
.NET vs Delphi: the "as" operator
public object Execute(object request) {
if (request is Request)
return service.Execute(request as Request);
else
throw new NotImplementedException();
}
Microsoft хочет, чтобы было так:
public object Execute(object request)
{
var r = request as Request;
if (r!=null)
return service.Execute(r);
else
throw new NotImplementedException();
}
потому что, как оказывается, "the "as" operator never throws an exception. Instead, if the indicated conversion is not possible, the resulting value is null."
Saturday, July 3, 2010
Javatar .Not
YouTube - Javatar .Not
See also "RailsEnvy.com: All Ruby on Rails Commercials"
Update 9-JuL-2010. С YouTube видео уже убрали: "This video is no longer available due to a copyright claim by Alley Music Corp." Однако по запросу "javatar .not" Google находит "about 44,200 results" in "0.35 seconds". Например, на New JavaZone2010.
Объяcнение шутки про Scala Johanson: http://www.scala-lang.org/
See also "RailsEnvy.com: All Ruby on Rails Commercials"
Update 9-JuL-2010. С YouTube видео уже убрали: "This video is no longer available due to a copyright claim by Alley Music Corp." Однако по запросу "javatar .not" Google находит "about 44,200 results" in "0.35 seconds". Например, на New JavaZone2010.
Объяcнение шутки про Scala Johanson: http://www.scala-lang.org/