Which one do you like? I have narrowed my choice down to Nemerle, Boo and F#. I really like Nemerle, but it's the least active of these, F# looks nice and is supported by Microsoft, Boo kinda failed to excite me, but isn't bad.
DISCUSS!
Name:
Anonymous2007-08-01 6:33 ID:1v/240uz
C# seems pretty cool. It's like Java, minus the aids.
IB Microsoft haters.
class Hello {
static Main () : void {
System.Console.WriteLine ("Hello, world!");
}
}
Name:
Anonymous2007-08-01 6:35 ID:2Lv5cRlK
nemerle is nice. Sure it's not very active, but the language has macros, which pretty much means that if there is something in the language you find lacking then you can add it yourself. Boo also seems nice, it's like a mix between the ML family + Python + a bit of everything. it has optional dynamic typing, something which I appreciate a lot. In fact that's what I don't like about these languages, I would rather look into the dynamic .net languages.
F# looks a bit messy to me, but maybe that's because ML seems messy to me.
Macros with syntax extensions can do this macro ReverseFor (i, begin, body)
syntax ("ford", "(", i, ";", begin, ")", body)
{
<[ for ($i = $begin; $i >= 0; $i--) $body ]>
}
defines a macro introducing the ford (EXPR ; EXPR) EXPR syntax and can be used like ford (i ; n) print (i);
Name:
Anonymous2007-08-01 7:07 ID:q4T6Ys+I
"SELECT firstname, lastname FROM employee WHERE firstname = $myparm"
L# .NET is a powerful Lisp-like scripting language for .NET. It uses a Lisp dialect similar to Arc but tightly integrates with the .NET Framework which provides a rich set of libraries.
L# is free software distributed under the terms of the GNU General Public License. You can download the latest release from Sourceforge. You may also want to read Rob Blackwell's Web Log.
>>20
Yeah, I don't think it's possible. Anyway, I figured out an alternative solution..
The problem was that there is this class that gets input from two sources and puts it together, one source sets up data, other requests it. As some data can be quite heavy and possibly never requested it's not a good idea to calculate it upfront. So, the idea was to, besides other data, set up also functions and later if required respond with what they return, that didn't work out so well. Alternative solution:
class Test
public static m1 () : IEnumerable
WriteLine ("HI2U FROM m1")
for (mutable i = 0; i <= 3; i++)
yield i.ToString ()
public static Main () : void
def a = ArrayList ()
a.Add ("foo")
a.Add (42)
a.Add (m1 ())
WriteLine ("BEGIN MATCH")
def loop (i = 0) : void
if (a.Count == i)
WriteLine ("END MATCH")
else
match (a[i] : object)
| _ is string =>
WriteLine ("string GET")
| _ is int =>
WriteLine ("int GET")
| _ is IEnumerable =>
WriteLine ("IEnumerable GET")
//foreach (z in a[i] :> IEnumerable)
//WriteLine (z);
| _ =>
WriteLine ("DUNNO LOL")
loop (i + 1)
loop ()
When you run this notice that there isn't "HI2U FROM m1", although you do m1 (), only when you uncomment foreach you see it.