<p dir="auto">This derives from the browser console, which is the only thing comparable to Deno's terminal repl.</p>
<p dir="auto">As of right now, the repl is a normal script, I believe that it would be more helpful to anyone using it If it were a module allowing imports, and with top-level await, as most of Deno is promise focused.</p>
<p dir="auto">I believe it to be reasonable to derive from the browser in this case as the repl / console is often used for something simple and short, and having more utility there would be helpful, and it shouldn't break any backward compatibility as scripts aren't intended to be programmatically run there.</p>
<p dir="auto">The console is merely a simple tool to help us out, is it not? What could go wrong?</p>
<p dir="auto">If anything, having an optional flag wouldn't be that bad,</p>
<p dir="auto">Maybe something like so: <code class="notranslate"> deno --repl=module</code></p>
<p dir="auto">When in the Deno REPL and executing:<br>
<code class="notranslate">import { env } from "deno";</code></p>
<p dir="auto">The output is:<br>
<code class="notranslate">SyntaxError: Unexpected token {</code></p>
<p dir="auto">Probably related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="377593861" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1158" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1158/hovercard" href="https://github.com/denoland/deno/issues/1158">#1158</a></p>
<p dir="auto">Executing: <code class="notranslate">deno -v</code> on the commandline returns:<br>
<code class="notranslate">deno: 0.2.1</code><br>
<code class="notranslate">v8: 7.1.302.4</code><br>
<code class="notranslate">typescript: 3.2.1</code></p>