logoalt Hacker News

VorpalWaytoday at 10:17 AM2 repliesview on HN

In what situations would a non-interactive language be a non-starter? I have never felt that I missed having a REPL when coding C++ or Rust. The only reason it is even useful in python is that the type info is laughably bad, so you need to poke things interactivly to figure out what shape of data you should even expect.

(I'll take strong static typing every day, it is so much better.)


Replies

SatvikBeritoday at 10:40 AM

REPLs/notebooks are really nice in situations where you don't know what you want ahead of time and are throwing away 90% of the code you write, such as trying to find better numerical algorithms to accomplish some goal, exploring poorly documented APIs (most of them), making a lot of plots for investigating, or working a bunch with matrices and Dataframes (where current static typing systems don't really offer much.)

show 1 reply
kryptiskttoday at 10:46 AM

People working with math or stats are often in an explorative mode, testing different things, applying different transforms to the data, plotting variables or doing one-off calculations. You need some form of interactive session for that to be feasible, whether it is a REPL or a notebook. There actually is a C++ REPL just for this use case from CERN, because they have a ton of HEP C++ code that they want to use interactively.