开发者

Do you know any other programming languages that have interactive mode like Python? [closed]

开发者 https://www.devze.com 2022-12-25 20:37 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this qu开发者_如何学Pythonestion will likel
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this qu开发者_如何学Pythonestion will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

Python language has a well known feature named interactive mode where the interpreter can read commands directly from tty.

I typically use this mode to test if a given module is in the classpath or to play around and test some snippets.

Do you know any other programming languages that have Interactive Mode?

If you can, give the name of the languages and where possible, a web reference.

If it is already mentioned, you can just vote for it.


Most (all?) lisps (including common lisp, scheme and clojure), sml, ocaml, haskell, F#, erlang, scala, ruby, python, lua, groovy, prolog.


  • PHP can do that too: PHP from the command line
  • Does mySQL count? mySQL Commands
  • JavaScript shell in SpiderMonkey (including, but not limited to, Firefox)


bash / tcsh / csh / ksh /...

they all are programming languages and have a CLI :)


Haskell even has two (mainstream) interactive interpreters, Hugs and ghci.


Tcl/tk has one. It's been there since day one. This is not a feature unique to Python.


As has been pointed out lots of languages can be used interactively, though how conveniently they can be so used varies quite a bit. The interactive environment I'm most familiar with, and one that I have found among the most congenial of all the free environments for interactive programming I've tried (not that I've tried them all) is Slime, a mode for emacs that allows interaction with a running Common Lisp, and can also be used with Clojure, a Lisp for the JVM.

If Lisp isn't your cup of tea a variety of Smalltalk environments are worth mentioning. One of the interesting things about many Smalltalk systems is that they expose almost all of the code that implements the system in the programming environment- if you want you can browse or even rewrite parts of the programming environment as you are using it, just as you would write new code. In fact the line between the system provided to you and the code you are writing is pretty blurry. Squeak is an interesting free Smalltalk, and Cincom offers an evaluation version of their commercial Smalltalk, which is a great environment IMHO.

Anyway, if you're interested in playing with interactive environments you could do worse than to play with those two, though of course there are a lot of other systems out there that allow interactive programming to one degree or another.


Lisp and Scheme have interactive mode.


C++.

Seriously.


Ruby has irb, which is an interactive interpreter, and Ruby is quite similar to Python.

irb at Wikipedia
Ruby at Wikipedia


Perl - interesting that there are so many answers before this


Ruby has it.. also Groovy has it (allowing you to test also Java code effectively).


I guess one of the first was LISP. Just try clisp


Most scripting languages will read from stdin and execute code typed at the console if you don't specify a filename to run. Php and perl will all do it.

Ruby has irb.

Lua has a more formal interactive mode like python, which will show you the indent level of your code at the prompt. It's very helpful since lua is typically used as an embedded scripting language, and you don't have to run your full application to test out code snippets.


Lua has an interactive mode as well.


Oh, I've forgotten the BASIC one :)


Prolog has one as well


Even Java has one!

It's called Beanshell: http://www.beanshell.org/


FORTH comes immediately to mind.

So does APL.

I remember seeing an interactive FORTRAN implementation on an SDS-930 (I think), many, many moons ago.


You can do almost-interactive C# and VB.NET using LINQPad


There's a repl for C too.


R statistic program ;)


Basic on the VIC20 and C64


There's one for C#.


Logo programming language.

Some implementations are so interactive that some people don't even use any other mode.


Any interpreted language is most likely going to have one.


Erlang does, as well as Haskell and i'm guessing Ruby does. Also there are Javascript CLIs like Firebug


Windows PowerShell: http://en.wikipedia.org/wiki/Windows_PowerShell


Boo is a nice middle ground between Python and C# - type-inference and procedural-compatible programming, with compatibity with .Net, plus ability to compile to CLR assemblies and .EXE's.


True to its name, the science-oriented and proprietary Interactive Data Language (usually just called IDL, but spelled out here to avoid confusion with the other IDL) has an interactive mode which many of its users utilize more often than they program in it.


Visual Basic .NET has an interactive mode.

0

精彩评论

暂无评论...
验证码 换一张
取 消