Support for E4X anytime soon?

Is support for E4X coming to JScript anytime soon I'm guessing no since 2.0 of the framework is about to roll out and it's not in there yet. Tongue Tied



Answer this question

Support for E4X anytime soon?

  • Peruri Srinivasulu

    Well honestly it's more important that it makes it into the ActiveScripting JScript engine, because it would be more useful on the client side. As for JScript.NET I'd see it as a rival to the C-Omega research language's native support for XML. The obvious benefits are support for XML concepts as first class datatypes in the language. Supporting E4X would make it a perfect language choice for writing web services on the .NET platform for example.
  • Christian Lucht

    The scenario I would think most immediately valuable would be building AJAX-enabled applications.

  • Lea41263

    We need this. AJAX apps would greatly benefit. I'm currently using JSON. Would be nice to have an XML implementation to support the X in AJAX. Please don't make us wait too long.
  • Lakshmi Kiranmayi

    While I'm sure "Ajax" style applications would be the first to come to mind, I personally think that E4X really shines on server-side & administration domains. E4X turns Javascript into an excellent "glue" language for xml.

    For example, I often times have to troll over large and/or numerous xml config files and I only need one or two pieces of info from each file that gets logged int a DB or put into a report. It turns out that Mozilla's Rhino has built-in javascript "console", and I've used it to create a rudimentary e4x "batch" script to assist in this. It came in quite handy, and I expect I'll use it elsewhere.

    Even though I don't care so much about raw performance in this context, the JScript interpreter is much faster than Mozilla's (or at least their Spidermonkey/browser interpreter... I haven't benchmarked Rhino yet). and I would have have loved to have been able to use it and bet the added bonus of easy access to the .net framework.

    Sadly, Mozilla's E4X documentation is abysmal, and doesn't fully explain how it works or where you'd want to use it. Hopefully if I have more time later I'll post a few of my snippets to this thread.

  • Los76

    E4X features will not be in the Whidbey release of JScript .NET. There is also no plans to add it for the next release of the COM classic version of JScript (IE7).

    At this point, we're evaluating how much customer demand there is for the feature set. What scenarios would you like to use E4X


  • Eric Molitor

    I read some benchmarking results (sorry lost the link) and it reckoned that xml to jscript using e4x would be 5 times quicker compared with large datasets than JSON.

    Don't get me wrong I love JSON, it is great for small Ajax functions or sending a single class with few nested object inside it. I have written a large project with uses JSON to port .net objects straight to jscript and back the other way, it is really great (plus there are JSON adapters for pretty much every other modern programming language)

    But I feel something like e4x would be great for binding large datasets to the page (when server side binding is out of the question).

    Mozilla has supported it for a while now, so it would be great to have it as an IE7 feature! Although I guess someone will soon release a e4x parser for IE7 (just like they did with JSON and json.js)

    Well.. thats my ten pence worth anyway!

    Tom Medhurst


  • Support for E4X anytime soon?