TP

Can't return anonymous type from method? Really?

One of the new features introduced in C# 3.0 which will be available in Visual Studio "Orcas" (currently in CTP version) is anonymous type. Anonymous type is something very similar to tuple type from Cω [1] (which is based on tuple types known from many functional programming languages including F#). Anonymous types are extremely useful in LINQ queries, because it allows you to construct type with several properties without declaring the type (with all the properties). Example of query with anonymous type looks like this:

var q = from c in db.Customers
        where c.Country = "Czech Republic"
        select new { FullName=c.Name+" "+c.Surname, Address=c.Address };

Ok, it's probabbly not the best example, but it demonstrates the point - you want to return some information from query and you don't need to declare type that contains FullName and Address properties before, because you need it only for this single query (and you want to return only these two fields, so you don't transfer additional data that you don't need from database).

Now let's get to the second point...

Published: Tuesday, 23 January 2007, 11:54 PM
Tags: c#
Read the complete article

Phalanger has a new website!

As you may know, I became new project lead for the Phalanger project [^]. Phalanger was started as a project at Charles University (where I'm studying) by Tomas Matousek, Ladislav Prosek and 4 other guys, the first version was very successful and they started wokring on the second version which introduces PHP in the family of first-class .NET languages (which makes it fully interoperable with the rest of .NET world). After releasing the second version, Tomas and Ladislav moved to Microsoft and convinced me to continue in the Phalanger development. Most of the work on the 2.0 version was already done, so we're currently working on implementing the rest of the PHP/CLR language extensions, making Phalanger more compatible with existing PHP apps and so on. For more information about the history of Phalanger visit the project history page [^].

I think that Phalanger is in the phase when it can be very interesting for both PHP and .NET communities, but it never got greater publicity and there are not very much examples and articles to demonstrate the interesting Phalanger features. To improve this we started working on the new Phalanger website where users could share their experiences, tips etc. We used PHP wiki called DokuWiki [^] (running, of course on Phalanger) and you can find the new website here:

I also wrote two articles about Phalanger (and I'm working on more :-)) to explain the most important and interesting Phalanger features and concepts. You can find the articles at our web:

I'll also continue blogging about Phalanger, so you can expect more information about Phalanger, problems that we're currently solving as well as some other tips, tricks in this blog. If you're interested only in Phalanger you can use this RSS feed to monitor new articles in this blog (it shows only articles with the Phalanger tag).

Published: Sunday, 14 January 2007, 12:49 AM
Tags: phalanger, mono
Read the complete article

All blog posts by tag

f# (112), functional (66), research (49), c# (37), academic (27), asynchronous (27), parallel (23), programming languages (22), functional programming (20), universe (20), meta-programming (18), philosophy (16), links (15), presentations (14), data science (12), writing (12), joinads (12), web (11), thegamma (11), talks (9), data journalism (9), math and numerics (9), random thoughts (9), phalanger (8), haskell (7), mono (7), webcast (7), design (6), architecture (5), fslab (5), open source (5), visualization (4), fun (4), accelerator (4), type providers (3), linq (3), f# data (3), .net (3), training (2), coeffects (2), deedle (2), monads (2), art (2), fractals (2), funscript (2), new york (2), manning (2), books (2)