今日已更新 412 条资讯 | 累计 19972 条内容
关于我们

On programming languages, targets, and platforms

Nicolas Fränkel 2026年06月25日 17:02 2 次阅读 来源:Dev.to

I started as a Java developer, but for some time now, I have broadened my horizons. Recently, I thought about how early languages were dedicated to a single target and platform, and now they are broadening their focus. In this post, I want to write down my thoughts in the hope that it may be useful to others, probably to my future self. Definitions You may have been wondering about the title terms. I'm pretty sure that if you read this post, you have a pretty good picture of what a programming language is. Some may disagree on some finer points or raise a hair-splitting one, but it's not a PhD thesis, only a post on my blog. I must define what I mean by target and platform in the context of this post before going further. Target A target only makes sense in the context of compiled programming languages. For example, C's target is native code , and Java's is bytecode . Platform A platform is the system that will ultimately run the target. Native code runs on the operating system; bytecode on the JVM. Early programming languages Early programming languages had a single target and platform. I mentioned C and Java, but Ruby, Python, JavaScript, etc., were all the same. Programming language Target Platform C Native code Operating system C++ Native code Operating system Java Bytecode JVM Python - Python runtime TypeScript JavaScript Browser & server-side JS JavaScript - Browser I believe it was the case for a long time. It changed at some point, though. Multi-target is the new black The first time I heard about multi-target was in Scala. Scala came from the era of single-target and targeted bytecode on the JVM platform. However, in 2015, Martin Odersky announced Scala.js, which added JavaScript to Scala's target. The original article was published on InfoWorld, but it seems to have redirection issues nowadays. Here's the introduction on a copy: Scala, developed as a functional and object-oriented language for the JVM, is now multiplatform, with developers using it in abun

本文内容来源于互联网,版权归原作者所有
查看原文