3 ms·
To me, if something acts logically like it is run from top to bottom, it's a scripting language. Python scripts and JavaScript are in this category; Java isn't
by mlyle 6y ago
To me, if something acts logically like it is run from top to bottom, it's a scripting language. Python scripts and JavaScript are in this category; Java isn't.
Additionally, explicit compilation/linking/assembly shouldn't be required for a scripting language, even if the interpreter does stuff kind of like this behind the scenes for performance.
- zepto 6y agoThat makes Ocaml and Haskel into scripting languages.
- kccqzy 6y agoYou can't just put `putStrLn "Hello"` in the top level of a Haskell program and expect it to work. You can do it in a REPL, but that's besides the point.
- zepto 6y agoSure. I was responding to this: “To me, if something acts logically like it is run from top to bottom, it's a scripting language.” I don’t see them as scripting languages, but that definition would include them.
- kccqzy 6y agoAnd my point is that Haskell doesn't even look like it's run from top to bottom. Example, consider this mutually recursive definition at the top level: a = 1:b b = 2:a It doesn't, by any means logical or not, look like it runs from top to bottom. If so, the first line would have immediately been an error because `b` is an undefined name.
- deleted 6y ago[deleted]
- zepto 6y agoMy mistake - I thought Haskell was like OCaml in not having a main function: http://stackoverflow.com/questions/28711563/ddg#28711778 http://stackoverflow.com/questions/28711563/ddg#28711778 You broadly dismissed my entire comment, which was completely correct about Ocaml, but I accept that you are correct about Haskell.
- smt1 6y agoHow about CPS style? https://golem.ph.utexas.edu/category/2008/01/the_continuation_passing_trans.html https://golem.ph.utexas.edu/category/2008/01/the_continuatio... Keep in mind that if you're implementing a branch predictor in HW, most CPUs will already be speculatively pre-running all sorts of code speculatively. Most of the current gen static analyzers/compilers linearize into basic blocks and run graph theoretic peephole compiler optimization passes, but that certainly isn't the only way to do to it. I guess with the future of hardware heterogeneous this is why data-flow or even more hybrid type of computer architectures are hot instead of mostly control flow-types of checks.