Hacker News new | ask | show | jobs
by wtetzner 4798 days ago
Not 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.

2 comments

What 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?)

Have you tried writing Haskell in the repl? I would argue that just omitting the types (essentially var:ing everything) would still make a repl very valuable for trying stuff out while you write your code. When I worked at citrix I would debug constantly in ironpython and I would find and fix bugs 5 times faster than my coworkers that would write clunky command line programs.. A repl is a very powerful tool that any nimble dev should take seriously.
I personally think its typical Microsoft stuff. Too little too late. C# is/was a delight to work with but Microsoft has built themselves into a corner with their platform. They are always 6-7 years behind and misjudge. We had to wait how long to get a decent shell?? Why couldn't they make the damn thing posix compatible?? Or how long we had to wait for a package manager???? I will admit though that if I was still stuck in miserable ms land I would program in f# exclusively. The way it does oop feels like an improvement over traditional languages which is paradoxically bizarre and fascinating at the same time. I don't know but in retrospect leaving .net was the best thing that ever happened to me personally. It broadens your perspective on software dev when you don't constantly constrain yourself to viewing your world through entity framework or nuget or whatever other precious few technologies that run well on windows. That's all.