Oskar Gewalli's blog articles

0
comment
on 11/22/2012 10:27 AM
I was thinking about how nice you have it in some languages where you can do a case statement for types. Thing is, we have a lot of compiler goodness in C# already. By being explicit about the type and using type inference we can have a generic Case statement of a maximum length (depends on how many if else you think are ok to add). I find it pretty sweet to write code like this:<blockquote class="tr_bq"> TypeMatch.Case(exception,   (GnarlyType e) => { HandleGnarly(e); },   (FuncyType e1) => { HandleFunky([...]
>> Read the full article
.
0
comment
on 11/22/2012 10:27 AM
I was thinking about how nice you have it in some languages where you can do a case statement for types. Thing is, we have a lot of compiler goodness in C# already. By being explicit about the type and using type inference we can have a generic Case statement of a maximum length (depends on how many if else you think are ok to add). I find it pretty sweet to write code like this: TypeMatch.Case(exception,   (GnarlyType e) => { HandleGnarly(e); },   (FuncyType e1) => { HandleFunky(e1); },   () => { Explo[...]
>> Read the full article
.
0
comment
on 11/14/2012 2:10 AM
Some times you encounter a class that implements IEnumerator without any IEnumerable implementation. To preserve the spirit of the enumerator (basically a cursor) we can just add an extension method that yields the elements. But most of the time it’s simply to add a “.Cast()" if it is IEnumerable without the extra type information.<div style="clear: both;"></div>
>> Read the full article
.
0
comment
on 11/10/2012 9:11 AM
As a programmer it is easy to adopt a view of the world in light of our experience. The workings of the world starts to look as something out of the matrix. This has some funny consequences: While listening to a person reasoning about the complicated events today from the point of view of famous thinkers; You can get the feeling of hearing a formalized thought pattern executed by a very complex machine. This sort of meta thinking naturally can be attributed to the formalization of execution that you work w[...]
>> Read the full article
.
0
comment
on 11/10/2012 9:11 AM
As a programmer it is easy to adopt a view of the world in light of our experience. The workings of the world starts to look as something out of the matrix. This has some funny consequences: While listening to a person reasoning about the complicated events today from the point of view of famous thinkers; You can get the feeling of hearing a formalized thought pattern executed by a very complex machine. This sort of meta thinking naturally can be attributed to the formalization of execution that you work w[...]
>> 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