Marc Sigrist's blog articles

0
comment
on 9/10/2017 1:46 PM
Once in the past, I was wondering how many times I had written null checks in C# so far. It must have been at least ten thousand times. Later, I discovered F#, which avoids null in most cases. Seeing that "in principle, it can be done in .NET languages", I wrote a Visual Studio User Voice suggestion to add compile-time null reference checking to C#. The suggestion quickly rose to the top and stayed there until today. Finally... Six yea[...]
>> Read the full article
.
0
comment
on 3/21/2015 9:29 AM
This blog post explains five F#-specific features who simplify and stabilize the implementation of vector algebra: Custom operators Inlining Units of Measure Type inference Automatic generalization We will use these features to define an infix dot product operator who is compile-time type-safe and generic.   Dot Product Operator Implementation let inline (.*) xs ys = Seq.map2 (*) xs ys |> Seq.sum The above line of code does not contain any type annotations. However, thanks to the F# compiler's built-in [...]
>> Read the full article
.
0
comment
on 3/21/2015 9:29 AM
This blog post explains five F#-specific features who simplify and stabilize the implementation of vector algebra: Custom operators Inlining Units of Measure Type inference Automatic generalization We will use these features to define an infix dot product operator who is compile-time type-safe and generic.   Dot Product Operator Implementation let inline (.*) xs ys = Seq.map2 (*) xs ys |> Seq.sum The above line of code does not contain any type annotations. However, thanks to the F# compiler's built-in [...]
>> Read the full article
.
0
comment
on 2/28/2015 2:37 PM
This is the first part of an intermittent series of articles about calculating Fibonacci numbers in F#. Each article will present a different kind of implementation. Where available, I will also show a corresponding implementation in C#. Step 1: Specification To be truly infite, the sequence has to satisfy three conditions: it has to be lazy, i.e., the numbers are not cached, but continually generated, the type of number must not have an upper boundary, and the algorithm must never cause a stack overflow.[...]
>> Read the full article
.
0
comment
on 2/28/2015 2:37 PM
This is the first part of an intermittent series of articles about calculating Fibonacci numbers in F#. Each article will present a different kind of implementation. Where available, I will also show a corresponding implementation in C#. Step 1: Specification To be truly infite, the sequence has to satisfy three conditions: it has to be lazy, i.e., the numbers are not cached, but continually generated, the type of number must not have an upper boundary, and the algorithm must never cause a[...]
>> Read the full article
.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper