.NET

236 posts

C# for Systems Programming

By way of the article “A glimpse into a new general purpose programming language under development at Microsoft” from the Lambda the Ultimate weblog, I came across Joe Duffy’s new post on C# for Systems Programming. Microsoft may be developing a native version of C# with additional extensions for systems programming that would compete with languages like C++, and D. Duffy’s work on immutability and isolation in C# is directly related to this native version of C# and mostly likely would not be part of CLR C#. While I use the term “native C#,” “systems C#” might be more accurate...

Mads on the Future of C# (6.0)

Mads Torgersen, head program manager of C#, presented the “Future of C#” at the NDC London conference on Friday morning 12/6. Most of the “probable” new features announced moved C# to a more succinct, functional programming style. Import type members into namespace. Succinct syntax for primary constructors. Readonly properties Property expressions (property lambdas) Method expressions Parameter arrays for IEnumerable interfaces Succinct null checking Multiple return values Constructor type inference Mads provided a code demonstration of each new feature with before and after illustrations of how the code would be implement today versus the future. The code example below is taken...

Immutable & Isolated Types Likely in Future C#

Immutable & Isolated Types Likely in Future C# Based on several pieces of evidence, immutable and isolated type designators are likely in a future version of C# and the common language runtime (CLR). These features will likely debut on .NET 5.0 in the next major iteration of Visual Studio, Visual Studio 2014. Immutable types in imperative language, US patent application filed in June 2008. Type system support for memory isolation permissions, US patent grant filed in Apr 2009. Unique and Reference Immutability for Parallelism, Microsoft Research October 2012 Imperative + Functional == . Joe Duffy on Uniqueness and Reference Immutability for Parallelism. Perspectives on Concurrency and Parallelism. Channel...

“In” Parameters Proposal for C# 6.0

I propose a new feature that will make manipulation of value types more efficient, produce more readable code, and encourage greater use of the functional programming style. I disclaim any ownership to this idea. Currently, there are two C# keywords that allow parameters to be passed by reference, “ref” and “out.” I will confine the discussion to “ref” parameters. The “ref” keyword has several disadvantages: For large value type structures, copying by value is wasteful. It may be more more efficient to passed a structure by reference. One such example of a real world data structure is the Matrix3D data...

Anders On C# 6.0 at BUILD 2013

Anders Hejlsberg and Charles Torre talked about a future version of C#, version 6.0, at Windows Build 2013. http://channel9.msdn.com/Events/Build/2013/9-006 (34:30) Visual Studio 2013 is the minor release version in an annual major/minor release cycle. The version of .NET included in VS 2013 is 4.5.1 which is an in-place upgrade of version 4.5. Major changes are expected for Visual Studio 2014 and .NET 5.0. C# 6.0 will feature an all new C#-based compiler based on Roslyn, which will be released with VS 2014. Roslyn is currently available as a community technology preview, which opens up new compiler services for third parties....

Microsoft AI Initiatives

Microsoft AI Initiatives Several computer science classes focus on algorithms. These include classes in data structures, artificial intelligence, computer graphics and numerical computing. Some of these data structures are quite involved and I have felt that they should be incorporated inside system libraries. Many of the classical data structures have in the 1990s become a staple of standard libraries such as the Standard Template Library of C++ and with the frameworks included with the Java and .NET runtimes. However, libraries for numerical computing (manipulating matrices and performing statistics), handling artificial intelligence, or doing computationally geometry have still not found themselves as full-class citizens...

The Awkwardness of Functional Programming

Both Reddit’s main page and programming subreddit includes a popular post “Admitting that functional programming can be awkward.” Each of these subreddits have elicited numerous interesting responses. In it, James Hague recounts how a semi-successful Mac game he wrote called Bumbler is trivial to write in C, but that a purely functional approach appeared to be barely doable and may well be the wrong paradigm for these types of problems: What's interesting is that it would be trivial to write this in C. Some incrementing, some conditions, direct calls to sound playing routines and insect spawning functions, reading and writing...

Immutable Data Structures in C#

In the post on Path Finding using A*, Eric Lippert, programmer in the Visual C# team, writes that immutable data structures are the way of the future in C#. As immutable data structures have been a frequent posting topic of mine, I am really happy about this direction towards immutable data and functional programming that C# is taking. My only quibble is that the last two words, "in C#," are not really necessary. The frequent complaint of functional programming is that it is slower than procedural programming. However, I discovered something else: As you know, the immutable data structures for...

Type Names

I picked up a lot of interesting knowledge about C# in the course of developing and testing a parser for the language. I'll try to post a few tidbits as they come to mind again. One nice tidbit is how to create new short type names without having to specify the full name of every non-primitive type, especially inside of generic type names. Normally, using "using" to create a new type name, even in the presence of the appropriate namespace import, one has to fully qualify every type name that is not a keyword. using System.Collections.Generic; using T = System.Collections.Generic.List...

Source Code

Scott Hanselman's post on Weekly Source Code 2 reminded me of my desire to post some of my source code. I'll probably do just that, but, with me and my short-term memory loss, I often forget to follow up until after a few years go by. A couple of my classes come to mind: Rational number class. This is an implementation of a general-purpose 16-byte data type that can precisely represent rational numbers (up to a certain precision), long (both signed and unsigned), and doubles. The code is written in IL to take advantage of extended-precision floating point. More info......

© 2015 - Wesner P. Moise, LLC. All rights reserved.

free web stats