Sometimes, we may run into this kind of situation that we want to check if the given method/function has been initialized. We all know this is fairly easy in C#, since we can use delegate to invoke the function , then verify if the value of delegate is null. But in F# , delegate is rarely needed because F# can treat a function as a value, without the need for any wrapper. So , here is an easy way to solve this problem.
6 people like thisPosted: 12 years ago by ZackZhou
It's not easy for F# programmer to deal with the unsafe code, here I tried to provide a small code snippet to demonstrate the issue.
1 people like thisPosted: 12 years ago by ZackZhou
it's quite easy to define a modifiable static property in C# , but in F#,a defined static filed is required first when the class want to define a static property.
8 people like thisPosted: 12 years ago by ZackZhou
It's not convenient to get the memory address of object in F#, and the following code will illustrate how to get the memory of given index item of an array:
3 people like thisPosted: 12 years ago by ZackZhou
When we defined an F# class in explicit way, it's easy for new F# programmers to make this kind of mistakes when they define mult constructors: people will forget to initliza the class first before use it.
1 people like thisPosted: 12 years ago by ZackZhou