6 ms·
Scriptcs gets a REPL
- tl 13y agoC# also has LinqPad as a REPL (http://www.linqpad.net/ http://www.linqpad.net/), but more is better in this case.
- glenn_block 13y agolinqpad is great. scriptcs is more than a REPL, it provides an end to end experience for authoring full apps as C# script.
- dev360 13y agoIf this would have come 7 years ago then maybe I would have been excited.
- _pixie_ 13y agoI hate how C# is constantly held to a double standard.
- wtetzner 13y agoWhat's the double standard?
- kevingadd 13y agoMost people never complain about Java or C++ not having REPLs, but somehow C# is expected to have Python/Ruby features even though it's a static language. For reference, 7 years ago would have been around when C# first introduced generics... well before it ever grew lambdas, LINQ, local variable type inference, or other more expressive features. Which makes the idea that it should have had a REPL then pretty silly.
- balakk 13y agoThat's a rather low bar, don't you think? Haskell/ML family languages had all that and more.
- kevingadd 13y agoHaskell/ML families bear only the slightest similarity to C#. Saying 'Haskell has a REPL, so why doesn't C#' is like saying 'C and GLSL both have structs, so why doesn't C run on my GPU?'* Furthermore, like I said in another comment, a C# REPL in that era would have been nearly unusable. The language is not designed for incremental authoring or compilation. * CUDA notwithstanding
- pjmlp 13y agoIt is a matter of implementation, it has nothing to do with the language per se.
- wtetzner 13y agoNot sure what being a static language has to do with having a REPL. Haskell and OCaml are static languages, and they both have REPLs. Scala too. Also, if Java had just gotten a REPL, I can see someone saying "If this would have come 15 years ago then maybe I would have been excited." I can't speak for dev360, but the way I read his comment makes me think that what he meant is that he's moved on to other languages at this point, so C# finally getting a REPL isn't really that interesting anymore.
- kevingadd 13y agoWhat I'm saying is, try writing some valid, compilable C#2-era code in a REPL and see what a good experience it is. Saying 'haskell and ocaml are static and they have REPLs' is totally missing the point; the way you write code and express types in those languages is different. C# is one of those 'fully formed type with methods' languages, where you have to define an entire type and its members up front. Not particularly REPL-friendly, especially in 2.0. Now, with the newer features added in C#4 and later versions of the language, it's possible to actually use it in a REPL because you can create instances of anonymous types and write lambdas with result/argument type inference and variables with inferred types, and you can define classes in multiple stages ('partial' classes). A Java REPL would have all these same problems, even now. (Or did lambdas ship?)
- Permit 13y agoI know that feeling. I remember seeing a post regarding the popularity of C# a few months back and the comments were filled with complaints that C# was more verbose than Python, lacked the instant gratification of PHP, had poor OOP when compared to Smalltalk and had worse support for functional programming than Haskell. While none of the criticisms are necessarily false, it seems bizarre to me that the only way people would use C# is if it came in first in every single category.
- wtetzner 13y ago> While none of the criticisms are necessarily false, it seems bizarre to me that the only way people would use C# is if it came in first in every single category. It seems like a leap to say that they expect C# to come first in every single category. From the categories you've listed, it doesn't come in first in any of them.
- Permit 13y ago>It seems like a leap to say that they expect C# to come first in every single category. From the categories you've listed, it doesn't come in first in any of them. No, but I'd argue it comes close to second in each category. If you were choosing whether or not to use Python or C#, why on earth would it matter that C# lacked the OOP abilities of Smalltalk and the functional capabilities of Haskell. To me, it doesn't make sense to compare one language to four other languages. It certainly feels as though C# is held to a different standard than other languages.
- egeozcan 13y agoI use C# actively at work, and also for some of my side-projects (though 80% of them are usually written in javascript). I definitely know a place where C# shines: Big projects with a lot of developers. C# is really easy to maintain in my experience.
- BThompson 13y agoScriptCS implementation of a C# REPL is just perfection! Extremely excited to see how ScriptCS continues to progress and improve! I see improvements in the project every day!
- kvb 13y agoI'll add an obligatory plug for F# if you're looking for a fully supported .NET language REPL (as opposed to a side project like scriptcs, not that there's anything wrong with it). As a bonus, F# is now fully supported by Xamarin Studio if you want to use it on non-Windows platforms, which means that in addition to a REPL, you have full IDE support for free on each platform.