I need a programming language to make tiny applications. As a C++ programmer, I think C++ is not practical for this purpose, because it takes too much effort to create a new application from scratch and to deploy it. However, I'd like to use a language equally powerful, so I was wondering whether C# can be used as a scripting language?
Read this one
CS-Script - The C# Script Engine
CS-Script is a CLR (Common Language Runtime) based scripting system which uses ECMA-compliant C# as a programming language. CS-Script currently targets Microsoft implementation of CLR (.NET 2.0/3.0/3.5) with limited support on Mono.
CS-Script is an open-source initiative that is distributed under the license agreement, which can be found here. However commercial support is also available.
CS-Script combines the power and richness of C# and FCL with the flexibility of a scripting system. CS-Script can be useful for system and network administrators, developers and testers. For any one who needs an automation for solving variety of programming tasks.
and
I would say that the usual benefits of a scripting language are:
- It normally has a command line interpreter
- You don't necessarily have to compile it
- It's easy to change the code - because the source file is the actual 'executable'
These are not features of C#, so a language that can do pretty much all that would be powershell, as it uses .net so it has access to all the features you might use in c#.
You could try Python, which is both a very understandable and powerful language. It is possible to parse/execute Python from many languages.
For example: Use SWIG to use C++ code in Python or Boost to embed Python code in your C++ app.
An other useful tool if you want to use C# for scripting is http://www.mono-project.com/CsharpRepl : a C# interactive prompt from the mono team.
I'd say that Mono in particular provides all of the tools to use C# as a very effective scripting language, and nearly anything you write in will run fine in .net if thats your main target environment.