[Mono-devel-list] C#Shell, an interactive interpreter (please try it and comment)

Chris Turchin chris at turchin.net
Wed Jul 21 17:42:38 EDT 2004


Hi Mads,

I had not used 'idle' for the longest time until just recently, and had
forgotten how useful it can be to prototype / test things. this little
shell for c# is definitely a step in making c# just as useful. i have
only played around with it for about 2 minutes and reading the ToDo
stuff, the priorities I would set to make it really useful would be
namespace integration and maybe code completion. After that, probably
workspace save/load/clear (variables) etc.

I would recommend looking at the monodevelop/gtksourceview code for the
code completion stuff and maybe it could just be useful in general for
the UI (I know, no UI critiques... ;-). It might even make sense to
integrate your shell into monodevelop as an addin, but that is a whole
other barrel of worms...

Cool app.

Regards,

--chris

ps: to your c# generics TODO: check out gmcs, the mono c# compiler for
generics from cvs.



On Wed, 2004-07-21 at 20:07, Debian User wrote:
> Hawdee
> 
> I have made a prototype of an interactive C# interpreter. I leave the
> majority of the actual parsing to mcs, but to the user it looks like a
> C# interpreter. I have made this program, because I as a Matlab
> developer, became very fond of the interactive Matlab environment and
> want the same thing for C#. The program can be downloaded from
> http://csshell.sourceforge.net/CSharpShell.tgz.
> 
> The best way to understand what the program does is to try it. But I
> have also tried to give a short explanation of what you can use it for
> in this section. By interactive C# interpreter I mean an environment
> where you can write small pieces of normal C# code. However with two
> differences. Firstly, you do not write method or class
> headers. Secondly, you can have variables that survive after a piece
> of code has been executed and can be used when executing another piece
> of code.
> 
> I would very much like to receive comments about making such an
> interpreter. I would also like to receive comments about making this
> program better integrate with mcs. But I do _not_ currently want to
> receive comments about details in the user interface. Remember this is
> just a prototype.
> 
> Below I will explain why I think such a program is a good idea.
> 
> Normally when programming, things go in a cycle. Firstly one needs to
> write the code, then compile the code, then execute the code, then
> discover errors, and then one writes new code, ...
> 
> This is a time consuming process and should be optimized. C#Shell can
> help with this optimization in two ways.
> 
> 1) In C#Shell one can write each sentence and see what happens. If
> something do not go as planned, one can quickly locate and correct the
> error. It therefore reduces the time between coding and
> response. Which is not just good when programming, but a general
> design principal when designing user interfaces (it is also called
> responsiveness).
> 
> 2) Compiling code is often time consuming, as not only the changed
> code needs to be recompiled but also the code depending on the changed
> code. This can easily lead to a large number of files that needs to be
> recompiled. This is not the case in C#Shell, as only the written
> sentences needs to be compiled (and some method/class header
> information automatically generated by the program). This again leads
> to better responsiveness.
> 
> However, C#Shell also has limitations. When programs get larger it
> will not be beneficiary to only use C#Shell for development, as large
> programs will get unwieldy in C#Shell. What it is good for is trying
> minor stuff, like the functioning of an API, unfamiliar language
> constructs, or testing a homegrown algorithm.
> 
> Greetings,
> 
> Mads Lindstrøm
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list