6 ms·
Scala 3 + VS code + worksheets is my favourite exploratory programming environment. Its has: * Powerful functional features * Powerful OO features * Imperati
by jules 5y ago
Scala 3 + VS code + worksheets is my favourite exploratory programming environment. Its has:
* Powerful functional features
* Powerful OO features
* Imperative features
* Powerful type system
* Great stdlib
* Great syntax
* Very fast write/test cycle with worksheets, way better than a REPL
* Great IDE features such as autocomplete
Scala may not be the best on any one axis, but the combination is unparalleled.
- sireat 5y agoI've been extremely happy with IntelliJ plugin for Scala. I do use Visual Studio Code for Python,JS,web, etc. What would be advantage of using VS Code over IntelliJ for Scala?
- jules 5y agoI'm familiar with VS code and have a set up that I'm familiar with (shortcuts & settings) and I've only briefly looked at IntelliJ, so I'm not qualified to answer this question. What is the reason you're using IntelliJ rather than VS code?
- merb 5y agosome shortcuts are just stupid. sorry, but coming from a mac some things are a little bit wierd.
- sireat 5y agoWriting Scala with IntelliJ is just so fun - 99% of time I get the right suggestion for Scala and/or Java libraries that I have not imported yet. Nice style suggestions that do not nag. Instant ScalaDoc generation. Pretty much picks up on all my brain farts. I imagine it is because of deep integration with JVM - after all IntelliJ started with Java. By comparison VS Code is just an editor underneath without the I in IDE. Theoretically VS Code is a bit like emacs or vim, you can set it up to do everything for your language but it takes a lot of tweaking.
- jules 5y agoSounds nice. I'll try it out!
- saym 5y agoCan you talk a little more about worksheets? I'm not familiar with scala worsheets at all. Follow-up: How do you transition to productionizing your code after iterating in them?
- jules 5y agoWorksheets are a simple concept: you write lines of code in them, and the IDE runs the code automatically as you type, and displays the return value of each line. If you're familiar with the concept of Jupyter notebooks, it's a bit like that. I tend to not view it as a replacement for an ordinary code file, but as a replacement for a REPL session. It has several advantages: * Keeping track of your previous commands in a file is much more convenient than keeping track of it in your input history of the REPL. * You can keep re-editing previous lines easily, and you can see the output of all lines. * There is no hidden state (unlike a REPL). Everything is run from scratch every time. * It's easier to define helper functions than in a REPL. * It's easier to turn a worksheet into a unit test than it is to turn a REPL session into a unit test. That said, it's also possible to start writing a module in a worksheet, and then turn it into an ordinary code file later. Worksheets aren't perfect yet; I can think of many improvements, but they're already very useful to me. I think the end game will be to merge the concept of worksheet, unit test, debugger, printf debugging, and ordinary code file into one system, like Sean McDirmid's usable live programming research work (which in my opinion remains one of the most underrated research projects). https://www.youtube.com/watch?v=01Xyoh-G6DE https://www.youtube.com/watch?v=01Xyoh-G6DE
- zzbzq 5y agoI don't know what worksheets are, but does Scala3 work with vscode now? Previously the plugins didn't do much, especially if you didn't use SBT.