This post originated from an RSS feed registered with .NET Buzz
by Paschal.
Original Post: Building the next new language
Feed Title: help.net
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/pleloup/Rss.aspx
Feed Description: .Net for mankind !
Ted Neward propose simply to implement some database relational functions in the language.
The idea of transacted code seems to be futuristic but why not ?
x = 5;
transacted
{
x += 5;
throw new IllegalArgumentException("can't do this!");
}
finally // a.k.a. commit
{
printOut("We committed! x = " + x);
}
rollback
{
printOut("We rolled back! x = " + x);
}
// x has the value "5", since the exception forces an implicit rollback
A bit freaky to see this kind of mix:
What I want is primitive types that understand the relational and hierarchical data models intuitively and allow me to exercise those operators as a first-class language concept.
At this point, I have no real idea how you would make all this work, but I envision something along the lines of:
relvar r = { fn, ln, age} [ ["Ted", "Neward", 32] ["Don", "Box", 39] ];
foreach (tuple t in r)
{
printOut("Name is " + t.fn + " " + t.ln + ", " + t.age + " years old");
}
relvar r2 = { fn, ln, age} [ ["Fritz", "Onion", 39] ];
relvar r3 = r UNION r2;
printOut(r3.count); // Prints "3", since there are 3 tuples