Script#: Write Your Javascript in C#

Javascript. A word that invokes feelings both marvelous and dreadful. On the one hand, it’s a powerful scripting language, and in modern browsers there’s a whole heckuva lot we can build with it. As far as the actual language goes, though, there’s lots to be desired. Utilizing OOP in Javascript is a pain in ass at best (remember prototype chains in Actionscript 1.0?), and language constructs are minimal - the lack of syntactic sugar in javascript could possibly be better called Syntactic Tabasco - it’s there, it’s hot, and it just doesn’t make things sweeter (yes, I do love Tabasco, but I don’t generally put it on my cupcakes, if you know what I mean).

Enter Nikhil Kothari’s Script# (that’s pronounced Script Sharp, for those of you who either aren’t musically inclined or live under a rock, take your pick).

Script# brings the C# development experience (programming and tooling) to the JavaScript/Ajax world.

The Script# compiler is a C# compiler that generates JavaScript as its output instead of IL. A key goal of the compiler to produce readable JavaScript (as if you had authored it by hand), and would be comfortable deploying into real apps. Hence the translation works from C# source directly into JavaScript without an intermediate IL layer. The compiler can also produce equivalent, but much more compact script for use in release mode deployment. The compiler does not introduce any additional levels of abstraction, thereby allowing you full control of what your application does. In essense the best of script with the best of C#!

I’m hoping to get a chance to play with this in the next little (short) while, but from what I’ve seen it’s pretty damned cool. Just having the compile step is pretty schweet - I’m a big fan of compiler errors over runtime errors, and runtime errors in Javascript are usually pretty painful (granted, that’s dependent on the browser, and there are lots of tools out there that make it better, but anyway…this is my blog, not yours - feel free to espouse “Notepad only Javascript development” on your own blog; for me, I’ll at the very least be using Notepad2).

And, of course, you already know I’m a big fan of C#.

Links:
Script# Project Page
Introduction to Script#
Script# and LINQ

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati

Anna Nicole Smith is Dead?

Anna Nicole SmithShe’s had a rough couple years.

“I can confirm that she is deceased. It’s as shocking to me as to you guys,” Smith’s attorney, Ronald Rale, told Reuters. “I don’t know anything further. [Her lawyer and husband] Howard [K. Stern], obviously, is speechless and grieving.”

Earlier this week, Smith was included in a class-action lawsuit against a company, TrimSpa, for which she had worked as a spokesperson. TrimSpa makes a product it claims leads to substantial weight loss. The lawsuit alleges the marketing of the product, TrimSpa X32, was false or misleading.
(quotes via CNN.com)

Wow. I’ve never been a huge fan, but she was some sort of icon - and 39 is young to die.

Which has got to be the most inane thing I’ve said today, so…that’ll be all.

via Citynews.ca / CNN.com

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati