4

Is it a good idea to use JScript.NET these days? Is there any IDE or text editor for JScript.NET? Is there any modern programming language on the CLR that has eval on language level (without the need of external libraries)?

user2102508
  • 1,009
  • 11
  • 23

2 Answers2

4

While I certainly don't recommend it, I do believe the .NET Framework still includes the JScript compiler. Seeming as the googling "JScript.net" pulls MS docs from the early 2000's I highly doubt it is still supported and information about it seems sparse. That being said, if you really want to use it is possible.

There isn't any IDE or editor that explicitly supports it, you should get basic highlighting with any editor that supports JavaScript. I tested it out using Notepad++ on JavaScript mode and it worked fine.

enter image description here

In order to compile, you'd do something like the following;

jsc /out:test.exe /t:exe test.js

Which would produce a test.exe file you can run.

Lastly, I don't believe any other language on the CLR supports eval at the language level, but I could be wrong.

James Parsons
  • 6,097
  • 12
  • 68
  • 108
2

I actually use JScript.NET all the time, I'm probably the only one that still does. It's very useful for making console apps without needing any extras to be installed on the machine.

It's not needed to download anything to start coding in JScript.NET, the jsc.exe compiler comes builtin to Windows 10, and you can compile a simple JScript.NET app to about 20k filesize, which is a lot less than is required just to run a Node script -> download Node (40mb) -> install Node -> run script.

The version of JavaScript is a bit weird, but not so different from modern ES5-ES6, like it has ...rest args in functions, and it has Class, Extends etc, and it has all the .NET goodies if you want to use them, and also optional strong-typing.

BoB
  • 71
  • 4