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?
CShell: A simple, yet powerful, C# scripting IDE
61–70 of 90 posts
Re: CShell: A simple, yet powerful, C# scripting IDE
#62Earlier 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?
http://msdn.microsoft.com/en-us/library/y5b434w4.aspx
int i = "5";
would not work.Re: CShell: A simple, yet powerful, C# scripting IDE
#63Earlier 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.
I guess you'd just have to declare it explicitly in that case.
Re: CShell: A simple, yet powerful, C# scripting IDE
#64Earlier 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.
Re: CShell: A simple, yet powerful, C# scripting IDE
#65I guess I'm old. My first thought was http://en.wikipedia.org/wiki/C_shell
Re: CShell: A simple, yet powerful, C# scripting IDE
#66Earlier 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.
Re: CShell: A simple, yet powerful, C# scripting IDE
#67It 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
#68Re: CShell: A simple, yet powerful, C# scripting IDE
#69It 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
#70Mono'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