Shell and REPL

A shell is a command-line interpreter that interprets what user enters in the command-line interface (CLI). And the CLI per se is a computer program for users to interact with computers with text-based UI.

A computer with Unix-like OS such as Linux, u…


This content originally appeared on DEV Community and was authored by Dita Larasati

A shell is a command-line interpreter that interprets what user enters in the command-line interface (CLI). And the CLI per se is a computer program for users to interact with computers with text-based UI.

A computer with Unix-like OS such as Linux, usually uses Unix-shell e.g. Bourne Again SHell (bash), TENEX C shell (tcsh), the Korn shell (ksh), the Z shell (zsh), etc.

A CLI implements read, evaluate, print, and loop (REPL) to make the interface interactive. It will loop until there is a condition that makes the process: read, evaluate, and print terminate.

However, those are some programming languages that have their own shell e.g. Python, Java, Clojure, NodeJS, etc. In Java, we will use java shell (JShell) in our CLI in order to interpret java syntax entered. In general, people call a CLI that uses JShell as Java REPL, it goes the same for other languages.

Actually, I am still figuring out the main purpose of a programming language REPL. We usually use IDE to develop a program with necessary, helpful, and important features inside. Presumably, because it only executes a unit of code, so it will be helpful to test atomically through REPL instead of running the program entirely. Honestly, I prefer to use replit.com for that case.

Popped in my head, if you inspect your browser and go to the console tab, it uses JavaScript. Yeah, I think that’s the best approach for a programming language REPL appearance.


This content originally appeared on DEV Community and was authored by Dita Larasati


Print Share Comment Cite Upload Translate Updates
APA

Dita Larasati | Sciencx (2022-07-24T18:10:00+00:00) Shell and REPL. Retrieved from https://www.scien.cx/2022/07/24/shell-and-repl/

MLA
" » Shell and REPL." Dita Larasati | Sciencx - Sunday July 24, 2022, https://www.scien.cx/2022/07/24/shell-and-repl/
HARVARD
Dita Larasati | Sciencx Sunday July 24, 2022 » Shell and REPL., viewed ,<https://www.scien.cx/2022/07/24/shell-and-repl/>
VANCOUVER
Dita Larasati | Sciencx - » Shell and REPL. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/07/24/shell-and-repl/
CHICAGO
" » Shell and REPL." Dita Larasati | Sciencx - Accessed . https://www.scien.cx/2022/07/24/shell-and-repl/
IEEE
" » Shell and REPL." Dita Larasati | Sciencx [Online]. Available: https://www.scien.cx/2022/07/24/shell-and-repl/. [Accessed: ]
rf:citation
» Shell and REPL | Dita Larasati | Sciencx | https://www.scien.cx/2022/07/24/shell-and-repl/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.