Live data from Hacker News

CShell: A simple, yet powerful, C# scripting IDE

cshell.net

61–70 of 90 posts

Re: CShell: A simple, yet powerful, C# scripting IDE

#61

Earlier quoted context omitted.

Can you elaborate? I'm not sure what you mean.

Unexpected conversions can add bugs. Putting a string into a table that was implicitely integer - if your string doesn't start with digits it gets converted to zero. Was that what you intended? Did you think the table would hold a string?

Type inference in C# with the var keyword doesn't work like a dynamic language like javascript. It works by simply using var as a placeholder for whatever type the right hand side returns, which is determined at compile time.

Re: CShell: A simple, yet powerful, C# scripting IDE

#62

Earlier quoted context omitted.

So it's not actually the type inference that's the problem -- it's developers who carelessly define implicit conversion operators on their classes.

Strings have built-in conversion, right?

The only built-in implicit conversions in C# are for numerics, and there isn't a loss in precision for those (with the exception of int/uint/long/ulong -> float and long/ulong -> double, where there is a loss of precision).

http://msdn.microsoft.com/en-us/library/y5b434w4.aspx

     int i = "5"; 
would not work.

Re: CShell: A simple, yet powerful, C# scripting IDE

#63

Earlier quoted context omitted.

Unexpected conversions can add bugs. Putting a string into a table that was implicitely integer - if your string doesn't start with digits it gets converted to zero. Was that what you intended? Did you think the table would hold a string?

Type inference in C# with the var keyword doesn't work like a dynamic language like javascript. It works by simply using var as a placeholder for whatever type the right hand side returns, which is determined at compile time.

So the type depends upon the initial values, which might not be representative of your full intent? A list of strings doesn't guarantee you won't want later to put something else in there.

I guess you'd just have to declare it explicitly in that case.

Re: CShell: A simple, yet powerful, C# scripting IDE

#64

Earlier quoted context omitted.

Type inference in C# with the var keyword doesn't work like a dynamic language like javascript. It works by simply using var as a placeholder for whatever type the right hand side returns, which is determined at compile time.

So the type depends upon the initial values, which might not be representative of your full intent? A list of strings doesn't guarantee you won't want later to put something else in there. I guess you'd just have to declare it explicitly in that case.

Yep, like if you wanted to put a list behind an IEnumerable interface or something like that, instead of an actual list. It's just a very useful shortcut for the thing you want to do 90% of the time.

Re: CShell: A simple, yet powerful, C# scripting IDE

#66

Earlier quoted context omitted.

Type inference in C# with the var keyword doesn't work like a dynamic language like javascript. It works by simply using var as a placeholder for whatever type the right hand side returns, which is determined at compile time.

So the type depends upon the initial values, which might not be representative of your full intent? A list of strings doesn't guarantee you won't want later to put something else in there. I guess you'd just have to declare it explicitly in that case.

Why would you want to put anything other than a string in a list of strings ? That's just looking for trouble IMHO.

Re: CShell: A simple, yet powerful, C# scripting IDE

#67
Scriptcs is out there for quite some time now. http://scriptcs.net/ it also has the motto "Unleash your C# from Visual Studio."

It provides you proper scripting abilities by using other libraries, writing classes in the REPL and scripting, like proper scripting languages. CShell just seemed like a windowed application whereas Scriptcs also runs on Unix environment with Mono I guess.

Re: CShell: A simple, yet powerful, C# scripting IDE

#68

Earlier quoted context omitted.

So it's not actually the type inference that's the problem -- it's developers who carelessly define implicit conversion operators on their classes.

Strings have built-in conversion, right?

Not the kind you seem to be thinking of.

Re: CShell: A simple, yet powerful, C# scripting IDE

#69
I mean this as truly constructive criticism. There are several spelling errors on the site that made me want to cringe.

It allows you to use C# without any fluff right in a console like environment caled a read-eval-print-loop (REPL).

CShell is a project sponsored and maintained by Arnova Asset Management Ltd., a quant hege fund, which uses CShell daily for their research. The main contributor from Arnova is @lukebuehler.

That said I like this idea and look forward to trying it.

Re: CShell: A simple, yet powerful, C# scripting IDE

#70
Nice to see another entrant in this space, offering functionality beyond LINQPad⁰ and the old SnippetCompiler¹. Microsoft has experimented with a REPL of their own² but there's nothing official yet.

Mono's REPL³ (MIT X11/GNU GPL; 2008) still has some rough edges on Windows. CS-Script⁴ (MIT; 2009) seems to have received the widest use but was hampered by a weird license until recently. Microsoft MVPs have stepped into the ring with scriptcs⁵ (Apache; 2013) based on the brand new Roslyn tech.

https://www.linqpad.net/CodeSnippetIDE.aspx

¹ http://www.sliver.com/dotnet/SnippetCompiler/

² http://stackoverflow.com/questions/1187423/anders-hejlsbergs...

³ http://tirania.org/blog/archive/2008/Sep-08.html

http://www.csscript.net/index.html

https://github.com/scriptcs/scriptcs

Post reply on HN