3 ms·
I'm not sure how that relates. None of those are scripting languages, although when you start talking about "compiled" it gets a little messy with definitions.
by jack9 9y ago
I'm not sure how that relates. None of those are scripting languages, although when you start talking about "compiled" it gets a little messy with definitions. Either way, it's not what I'm talking about.
- weberc2 9y agoYou're the one who invoked "scripting" out of the blue. There's no reason to artificially limit the conversation to scripting languages, especially since "scripting" is itself poorly defined (what constitutes a scripting language? An interpreter? Where do interpreters end and VMs begin? Python's "interpreter" is a VM; is Python not a scripting language? Python even compiles to Python bytecode--is Python then a compiled language?). If you're going to scope the languages being evaluated, do it by something meaningful, like problem domain--for example, "web applications". I can't speak to D, but Go is certainly a competitor in this space, and speaking from experience, it's much, much more performant than Python and PHP by virtually all metrics. Maybe you mean data science, in which case Python and Go can be compared, but I don't know that anyone is doing real data science work in PHP. Maybe you mean "general purpose language", in which case all of the previously discussed languages can be compared, and in which case Go and D completely outclass Python and PHP.
- cygx 9y agowhat constitutes a scripting language? It's indeed a bit fuzzy, but program execution without separate compilation (which is not a feature of a language per se) is something I'd look for. As far as intrinsic language features go, a lack of boilerplate in the sense of print("hello") vs class Hello { public static void main(String[] args) { System.out.println("hello"); } } is a good indicator, as is dynamic typing.
- weberc2 9y agoThis isn't a meaningful definition because compilation and execution under a single command is trivial for any compiled language, including Go and Python and PHP. As for lack of boilerplate, Haskell and many statically-typed, compiled functional languages have less boilerplate than PHP or Python. Dynamic typing is more meaningful, but regardless of definition, I fail to see why it's useful to restrict the scope to scripting languages. However, even if you make this restriction, there are many, many languages that are dynamically typed "scripting" languages that are much faster than PHP and Python (JRuby, Lua, JS, Wren, most lisps, etc).
- igouy 9y ago> dynamically typed "scripting" languages that are much faster than PHP and Python (JRuby ? http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=python3&lang2=jruby http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...
- weberc2 9y agoThat's not the graal backend. The TruffleRuby project uses Graal to make JRuby much, much faster. I don't know what the specific information, but generally "competitive with Java" is my understanding. Perhaps "TruffleRuby" is the name I should have used; it's not apparent and I'm only nominally familiar with the project.
- igouy 9y agoCurrent Status: "TruffleRuby is progressing fast but is currently probably not ready for you to try running your full Ruby application on." https://github.com/graalvm/truffleruby#current-status https://github.com/graalvm/truffleruby#current-status
- weberc2 9y agoOk, I was wrong about Ruby, but my point stands--Python and PHP are not even "speed demons" of the so-called scripting languages.
- hasenj 9y agoD and Go compilers can both run a script seamlessly without a visible compilation step (it still happens, but behind the scenes, and compilation is fast enough that you would not even notice it).
- cygx 9y agoThat's what makes it fuzzy. I would argue that the defining characteristic of a scripting language is the ability to execute scripts instead of generate binaries. You could then make a further distinctions between application scripting languages (the origin of Lua and Javascript) and general-purpose scripting languages (which are independent of a host application - think Perl or Python). This distinction is not sharp: Today, Lua and Javascript are used as general-purpose scripting languages, people ship 'fakecutables', packaging script and runtime system into a binary, and even C++ has been used to script applications (physicists are silly people ;)). But there's normally still a dominant usage pattern associated with a given language, so the classification is not entire useless.
- jack9 9y ago> You're the one who invoked "scripting" out of the blue. Not at all. It naturally follows from the incorrect assertion that > > PHP is no one's standard for "fast". except within a set of constraints...like scripting languages (of which the pointless bikeshedding often and has occurred). > There's no reason to artificially limit the conversation to scripting languages, You've just decided to derail a discussion of a finer point and claim it's in the interest of the main conversation because it's not the main discussion. I can only assume is that you like to argue and had nothing better to do. Good Luck with that.
- weberc2 9y agoYou introduced an arbitrary, irrelevant constraint as though it was the only valid criterion and got called on it. No need to be sore about it.
- hasenj 9y agoIt relates because we are not talking about scripting. We are talking about programming. Python/Ruby/etc.. are slow. D/Go/C/Rust/etc.. is fast.
- jack9 9y agoI constrained my point. You are now making your own determination. Good Luck with that.