Contents tagged with LINQ
-
Scott Guthrie presents at NDDNUG
Scott gave a whirlwind presentation to a standing room only crowd at the North Dallas Dot Net User Group tonight. A wide range of topics were covered from IDE tips and tricks to ASP.NET tips to MS AJAX to LINQ and DLINQ (I still like to call it DLINQ rather than LINQ to SQL). I'm still not sure how all this got packed into a little over 2 hours. :)
-
Suggestions for distributing CTPs as VirtualPC images
I finally got around to trying the Sept. CTP of Orcas. I loaded up the VPC images on VPC7 Beta (which seems to perform much better than VPC2004). If this is going to be the way that MS is going to release CTPs in the future here are a few suggestions:
-
A great article on functional programming...
http://www.defmacro.org/ramblings/fp.html
This article was a great overview of many of the aspects of functional programming. With what Micosoft is doing to the CLR and C# and VB it would seem that functional programming is making advances into the main stream. His article has imaginary Java samples and if you squint your eyes when he creates a class to hold a function you can see delegates.
I studied functional languages such as LISP and ML in college but quickly lost track of them after years of programming in corporate IT. To catch back up I've been spending the better part of a year studying functional programming concepts. While its been challenging at times, there have been alot of aha and oh yeah moments.
Since I have a great comfort level with C syntax I started my ride on the functional wagon with COmega. This is where I really began to "get" things like closures. I even found myself purposfully writing my own code to mimic a closure in good ol C# 1.0 for certain situations like Regex match evaluators. Once you see the "patterns" that higher order functions exhibit you can write them in plain imperative code. This will make you hunger for language constructs to do this work for you. Its like writing OO code in assembly language.
C# 2.0 Added true closures to the language with anonymous delegates. Woo hoo no more private nested classes to hold lexical context! (at least not that I write).
At PDC I got to see the preview of C# 3. This takes anonymous delegates a step further with "lambdas". There's lazy evaluation galore with LINQ. It would seem that MS has been bitten by the functional bug. Even the Atlas client APIs make good use of the functional elements of JavaScript.
I've also ventured out into IronPython and Ruby. These are great places to practice functional programming techniques.
The real challenge moving forward is finding the right balance. Theres no doubt in my mind that functional programming techniques are headed to the main stream. With the populatrity of Ruby and Rails and Microsoft adding functional capabilites into C# and VB the winds of change are blowing.
Link dump so I can keep track of what I'm researching:
COmega: http://research.microsoft.com/Comega/
LINQ: http://msdn.microsoft.com/data/ref/linq/
F#: http://research.microsoft.com/fsharp/fsharp.aspx
IronPython: http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython
Ruby: http://www.ruby-lang.org/en/
Ruby.NET: http://www.plas.fit.qut.edu.au/rubynet/
IronRuby: http://wilcoding.xs4all.nl/Wilco/IronRuby.aspx
RubyCLR: http://www.iunknown.com/articles/2006/06/19/rubyclr-drop-4
Atlas: http://atlas.asp.net/Default.aspx?tabid=47
#Smalltalk: http://www.refactory.com/Software/SharpSmalltalk/index.html
brianbec's blog:
http://weblogs.asp.net/brianbec/default.aspx
http://weblogs.asp.net/brianbec/archive/2006/06/01/Lambdas_2C00_-Closures_2C00_-Currying_2C00_-and-All-That.aspx -
What should a "Stream" operator look like in C#?
Streams were one of the core concepts that I latched onto with Cw. It elevated enumerable lists as a first class problem domain. The fact that int* really was IEnumerable
<int> melted away as an implementation detail and allowed me to begin to think in terms of lists ala (LISP/Scheme). This way of thinking seems to be extremely core to LINQ since the underpinnings are all based on IEnumerable<T>. This is why I feel very strongly that IEnumerable<T> deserves some special consideration by the language. If Nullable<T> can have its own operator where's the love for IEnumerable<T>?