Got new project in my TODO and can't chose F# or Nemerle.
I'm currently learning F# and have some projects on Nemerle.
I like F# way , I like indent by default (also I want indent by default for nemerle2), I like many features and magic of F# but there is no macros.
The goal of F# is VS2010 and maybe (maybe) bigger developers team and it's looking like Haskell(can create light Linux programs with it and it's fun).
The goal of Nemerle is macros and I think I like some syntax of Nemerle more.
and most people just like C#...
- So the language must be perspective
- Syntax must be logical , easy to understand, neat and powerfull(less code)
- It must be easy to use with .NET
- So I already closed my self with the chose of this 3 ones.
- I can use them all but what about chose one. It's not so easy for me.
just for example I like (Nemerle)
match(STT)
| 1 with st= "Summ"
| 2 with st= "AVG" =>
$"$st : $(summbycol(counter,STT))"
much more then (F#)
let (|Let|) v e = (v, e)
match stt with
| Let "Summ" (st, 1)
| Let "AVG" (st, 2) -> srintf "%s ..." st
F# :
["A"; "B"] |> List.iter (fun s -> printfn "%d" s.Length)
Nemerle:
["A", "B"].Iter(x => printf("%d", x.Length))
F# (hope not mistaken here):
let type X =
let mytable a = ""
let mytable b = ""
new(A, B) = {
a <- A
b <- B }
member X.A
with get = a
member X.B
with get = a
Nemerle :
[Record]
class X
public A : string { get; }
public B : string { get; }
C# :
class X
{
private readonly string _a;
public string A { get { return _a; } }
private readonly string _b;
public string B { get { return _b; } }
public X(string a, string b)
{
_a = a;
_b = b;
}
}
and here is nemerle code I already can't convert to F# (so I only learning it) ...
abstract class ABase
abstract public A : string { get; }
interface IB
B : string { get; }
[Record]
class My : ABase, IB
public override A : string { get; }
public virtual B : string { get; }
Comparison to C#:
abstract class ABase
{
abstract public string A { get; }
}
interface IB
{
string B { get; }
}
class My : ABase, IB
{
private readonly string _a;
public override A : string { get { return _a; } }
private readonly string _b;
public virtual B : string { get { return _b; } }
public My(string a, string b)
{
_a = a;
_b = b;
}
}
Clearly Nemerle code is easier to support and more readable.
@Brian So that's why I'm asking , show me if that real to make this easer on F# , C# also if you see I do it wrong because I'm not sure about other ways to make clearly the same.