Nemerle. Finally.

It took 5 seconds compiled in debug. What I'm extremely interested in the moment that Nemerle macros. However, Visual Studio support seems as poor as for F# :( No even "find usages" or "rename"... Uh...

Update 21.06.15, new code:


Result in Release configuration - 1.45 seconds.

Comments

This comment has been removed by the author.
> However, Visual Studio support seems as poor as for F# :( No even "find usages" or "rename"... Uh...

Nemerle support this refactorings. Although, of course, it's not ReSharper :).

Regarding the speed, try this version:

using Nemerle;
using System.Console;

module Program
{
[Memoize]
fib(n : int) : int
{
|0 |1 => n
|_ => fib(n - 1) + fib(n - 2)
}
Main() : void
{
foreach (i in $[0..39])
WriteLine($"fib($i) = $(fib(i))");
}
}

It's a power of macro! :)

Popular posts from this blog

Upcoming F# struct tuples: are they always faster?

Computing cryptography hashes: Rust, F#, D and Scala

Composing custom error types in F#