For my purposes of learning Scala, I generally want to follow the compile, then run model. I didn't want to get into a whole IDE, so I'm still using vim and doing this from the command line. For this to work, however, I needed to extend App, like this:
The key bits are to extend App, and the name you use for the object must be used when running it. So you could name it calc, but then you must also run it with "scala calc", not "scala Calc".
This allows you to catch typos with the compiler and do some simple testing with the asserts. Later, I'll figure out how to integrate a test suite, but not today.
Perils of a newbie player
I first encountered disc golf back in 2017. I played a little bit and then for reasons I don't remember, I kind of walked away. Skip...
January 22, 2020
A real quick Scala tip
Subscribe to: Post Comments (Atom)
My meetup to learn Haskell was a success in the sense of meeting new people. There have been a core 5-6 that have shown up with varying leve...
Since my last post, I have spent a fair amount of time getting familiar with Elixir. I did a little work through The Daily Drip . That did...
A long time ago, I read Gary Taube's book Bad Calories, Good Calories . I found it a bit difficult to get through and totally understa...
Post a Comment