Читать книгу Beginning Programming All-in-One For Dummies - Wallace Wang - Страница 88

Finding an Interpreter

Оглавление

Interpreters are commonly used for scripting languages, such as Perl or Python, but they’re rarely used for system programming languages, such as C++. That’s because if you write a program and use an interpreter, you must distribute a copy of your source code with the interpreter. Giving away your source code essentially gives away your program, so most commercial programs use a compiler instead.

However, interpreters can be useful for learning a programming language. By using an interpreter, you can focus solely on learning a programming language without the distraction of creating a complete program.

One popular type of interpreter is the online interpreter, which lets you use any browser to practice typing specific language commands. JDoodle (www.jdoodle.com) lets you select from dozens of popular and obscure programming languages such as C++ and Swift, along with less common languages like Forth and Smalltalk.

If you’re interested in Flutter, Google’s cross-platform tool for creating Windows, Android, macOS, iOS, and Fuchsia apps, you can practice writing Dart code on the Flutter website (https://flutter.dev), as shown in Figure 4-3.


FIGURE 4-3: The Flutter website lets you type and run code using any browser.

Nearly every web browser comes with a JavaScript interpreter. Web designers use JavaScript for creating interactive web pages, verifying information typed on a web page (such as a username and password), or opening pop-up windows that display advertisements.

Although JavaScript interpreters can be found in any web browser, you may have to download and install interpreters for other programming languages. Some popular programming languages for running programs on web servers (those computers responsible for displaying and retrieving information from web pages, such as shopping data) include

 Perl (www.perl.com)

 PHP (www.php.net)

 Python (www.python.org)

 Ruby (www.ruby-lang.org)

Not only do the preceding four languages have free interpreters that you can copy, but their interpreters also run on different operating systems. That means a Perl or Ruby program written on a Windows computer should run identically if it’s copied and run on a Linux or Mac computer.

Beginning Programming All-in-One For Dummies

Подняться наверх