Hacker News new | ask | show | jobs
by MichaelGG 5178 days ago
There is one statically typed language with a nice toolchain that allows interactive (REPL) programming and scripting: F#.

Try the steps here[1]. They're old, but still work, and work pretty well. It's fast; there's no need to create a project or solution. You can type your code all you want, use IntelliSense and all that, then select and Alt-Enter to execute it.

If you don't want to load VS, you can just run "fsi" for the interactive shell alone. You'll lose the full IntelliSense and colour highlighting, but you still get tab-completion. Plus, F#'s syntax is much lighter than C# or Java, so it's nicer for quick scripts.

Quite frankly, for any level of programming, I find having a REPL available is such a massive productivity boost. I shouldn't have to give up static type checking and a slick IDE to get it.

http://blogs.msdn.com/b/jomo_fisher/archive/2008/08/25/f-scr...

2 comments

And F# is not the only statically typed language with a (built-in or out of the box) REPL: ML, Haskell, OCaml, and Scala all have REPLs.

Some of these predate Java and C#, but I don't know what it is about those languages and the cultures around them that has ignored the value of a REPL. I guess part of it is just inertia at this point, but it's definitely one of the biggest things I miss when working in Java on Android.

The problem is F# has arguably the best tool chain out of all of the languages you listed. Hell, I still have problems getting Scala to work with Netbeans 7.1 and I'm not sure of any IDE (for windows at least) for ML, Haskell or OCaml.
You may be right, but on the other hand F#'s toolchain isn't that hot on OS X and Linux (being facetious, but I'm half-serious). Anyway I was really only talking about the presence of a "first-class" REPL.
If you've got Silverlight, http://www.tryfsharp.org/Tutorials.aspx