Berre Berre

Niner since 2006


  • Don Syme: Introduction to F#, Part 2

    Does the .net CLR support proper tail calls?
    I believe that was a problem for som developers, who were working on a ML compiler for the Java VM.

  • Don Syme: Introduction to F#, Part 2

    ChadK: assuming they use the same syntax as ML, the "_" just means ignore this argument.

    for example in:
    renderer.DrawScene.Add(fun _ -> bla bla...

    renderer.DrawScene.Add takes a function as an argument, which itself takes an argument. So they pass an anonymus function, but since this function won't use it's argument, they don't give it a name.. just a _.

    It is supposed to help with clearity when reading the code. had they written "fun x -> bla bla..." you might think, "what's this x? it doesn't seem to get used". Instead you put a "_" indicating that you are only accepting an argument to appease the type checker.