• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics with the tag "programming languages". Back to normal view
    1. Programming Languages that are Both Interpretable and Compilable?

      I've been thinking about the feasibility of defining a language spec that can both be compiled and interpreted lately. I first thought about it while writing code in crystal, which, for the...

      I've been thinking about the feasibility of defining a language spec that can both be compiled and interpreted lately. I first thought about it while writing code in crystal, which, for the unfamiliar, is a compiled language based heavily off the syntax of an interpreted language (ruby).

      Here are a couple reasons I find the idea interesting:

      • It effectively neuters the interpreted/compiled language debates. Why just choose one, when both have such big upsides?
      • You could develop a program in the interpreter with the same playfulness as you get in a shell, and then compile it into a speedy 'lil thing!
      • It would be wonderful for metaprogramming! From my experience, languages usually define a little janked together syntax for compile-time execution. If the language had an interpreter for itself within the compiler, you could metaprogram and program in the exact same language.

      I'm curious if any languages like this exist, or if you can think of more benefits.

      Edit:
      I just want to mention that my reference to 'feasibility' earlier is not born of disbelief - you can write a compiler or interpreter for any (to the best of my knowledge!) well defined formal grammar with enough effort. I suppose I left that word there to account for the fact that I might have unknown unknowns here.

      14 votes
    2. Which language would you pick to completely rewrite BSD, Linux, etc.?

      It'd my understanding that C has stuck around in the UNIX world for so long, nearly half a century, mostly due to the inertia of legacy code. If you could snap your fingers and magically port/fork...

      It'd my understanding that C has stuck around in the UNIX world for so long, nearly half a century, mostly due to the inertia of legacy code.

      If you could snap your fingers and magically port/fork the entire stack of open source codebases to the language of your choice, which would you pick and why?

      20 votes