Programming Languages Will Become OSes 461
Anonymous Coward writes "A couple of months ago, at the Lightweight Languages Workshop 2002, Matthew Flat made a premise in his talk: Operating systems and programming languages are the same thing (at least 'mathematically speaking'). I find this interesting and has a lot of truth in it. Both OS and PL are platforms on which other programs run. Both are virtualizing machines. Both make it easier for people to write applications (by providing API, abstractions, frameworks, etc.)"
Happened before... (Score:5, Insightful)
Really? (Score:5, Insightful)
A single machine could have multiple languages co-existing for different tasks. Some of these tasks require quick and dirty scripting, some require high performance and some other application programs might concentrate on object oriented features and such.
The operating system, on the other hand, is typically only one per machine and performance and stability might be the major considerations (other than compatibility with the popular applications around!)
Bah (Score:4, Insightful)
OSes and programming languages have some superficial features in common, but they are totally different concepts. This is so manifestly obvious that I'm not even sure how to argue the point.
However, Mr. Flat's suggestion that languages need better isolation capabilities is a good one. It all goes back to Fred Brooks' point that one in ten programmers is a superstar. I think isolation facilities in a programming language allow the superstar to set the rules that the other nine programmers must follow, making the system more coherent by the guidance of one mind.
That's why MS is so afraid of Java (Score:3, Insightful)
don't think so (Score:4, Insightful)
For one the wall between OS space and user space is there for a good reason (security) and second different people like to use different languages, and you'll lose a good part of your developers by forcing them into the straightjacket of a single language for a certain os.
it's been tried before (smalltalk, java) and failed, for these and a whole bunch of other reasons.
Idealism (Score:3, Insightful)
Re:Smalltalk as OS (Score:5, Insightful)
Smalltalk was originally the entire system on the original hardware. Indeed, Dan Ingalls said back then (paraphrasing, I don't have the exact quote handy) "An operating system is a collection of things that don't fit into a programming language. There shouldn't be one".
The reality of commercial machines caused those of us interested in using Smalltalk to accept the limitations (and it must be said, benefits) of OSs. Even so, there have been several occasions where an attempt has be made to use Smalltalk as the entire system: the Active Book and the Momenta machines for example and more recently the Interval Research MediaPad (where the RTOS was written in Smalltalk).
These days I'd be inclined to 'soften' Dan's statement to something like "An OS is a collection of things underneath the language. There shouldn't be any way to tell the difference". That is to say, the language ought to be able to make full use of anything available without having to burden the programmer with wierd crap.
Isolation capabilities... (Score:2, Insightful)
So what Mr Flat is really saying is that he hasn't looked at Eiffel, Ada, OCL or any design by contract work.
This really is a bizarre article that most first year students would get marked down for.
no, they won't (Score:5, Insightful)
The best attempt at isolation at the language level is probably Java. The internal security architecture is rather complicated. And even after half a dozen years, Java still does not provide anything like "ulimit" and I wouldn't trust it to isolate arbitrary code within the same VM.
The two lines summary (Score:4, Insightful)
At LL2 Matthew Flat posed that, while OS's and programming languages both support application development, by providing libraries of function calls, their difference in focus fundamentaly sets them appart. OS's focus on isolation of code, for security and for stability. Programming languages focus on cooperation, and try to maximize code reuse and efficiency.
Basicaly, OS hacker and the PL hacker have alot to learn from each each other. They would win at from cross-pollination between the two fields. Matthew then proceeded to show his implementation of what operating system concepts would look like in a programming language, by demoing DrScheme [drscheme.org], a programming environment which can run (and debug) itself recursively.
Re:Funny he did not mention .NET (Score:1, Insightful)
Java has many meaning. Platform, language, coffee, and anything people put at it.
Don't screw up between the Java platform which has threading and other stuff (which the java language has the capability to use), the java language thread is just a way for the dev. to talk to the platform thread.
Note, if anyone still confused, then here's the clearification:
a language provides way to hook into platform.
So, a language's thread is not the same as platform thread. They are a same name, but one is a syntax to use to get into the real one.
Just like the word *pen* in the language:
"give me a pen" is not the same as a real physical pen, but you can use the language, to get access to some physicall word (if there's a running system that listen to your word)
Programming Language != OS (Score:1, Insightful)
Re:Happened before... (Score:4, Insightful)
The Feds. They've done it before (Ada) and, I'm sure, wouldn't mind doing it again.
Exactly (Score:4, Insightful)
Re:Funny he did not mention .NET (Score:4, Insightful)
Of course the other reason MS might be pushing .NET so much is the money they stand to make off of the hundreds of books they've written on the subject.
Note that .NET is not a programming language (and I've already seen it used this way in this thread). .NET is a platform (the CLI is like the Java VM) and a framework (the class libraries) but it's not a language. C# is a .NET language, VB.NET is a .NET language, (language).NET is a language, but .NET isn't a language.
Tip: If you ever ask someone what they're writing their app/web site in and they say ".NET" and can't say anything else (like C# or ASP.net) then they don't know what they're talking about (and I should know - I used to do it myself).
Re:Happened before... (Score:4, Insightful)
if people want to use the machine (or OS), but don't like the language it understands, they will build translators from whatever made up language they like to the language the machine does understand (i.e. compilers and virtual machines).
A Microprocessor *IS* a language Interpreter (Score:3, Insightful)
Re:Sure, the distinction is artificial/arbitrary.. (Score:5, Insightful)
Same with Windows Explorer. The "My Computer" icon is part of Windows' operating environment. You can, believe it or not, use Windows without using Explorer (using the command line or a replacement shell like LiteStep). Windows just isn't designed or intended to have its core components replaced so easily. I think there was a court case about it... Anyhow, I used to run Windows NT with just cmd.exe as the shell, which was fun for a few weeks, figuring out how to set control panels from the shell. With cywin & GINA installed, you could put a nearly complete UNIX face on NT and still be able to run Win32 apps.
Sun is one the only companies I've seen distinguish between an OS and OE. They used to (still?) call it the Solaris Operating Environment, with the SunOS kernel as the underlying OS. The truth is nobody cares. _My_ eyes are glazing over just writing about this. My sincerest condolences to your disintigrating brain. But on the bright side, without the ambiguous use of technical terms, slashdot readers would have a lot less to argue about, and this site would degrade into a competitive festival of increasingly embarrassing personal confessions on sex, drug use, music, government secrets, scams, circumventing the law, satire, and other boring stuff like they have kuro5hin. If we should be so lucky.
If you wait long enough .... (Score:3, Insightful)
On the IBM System/3 in the later 60's and early 70's, the RPG/II compiler generted a binary that was booted onto bare iron to run. (If you were really down-scale, like I was, the compiler was a bootable 4-foot deck of punch cards and the result was a freshly punched deck of cards that was itself bootable.) This included the code for both the "program" -- the business logic -- and the "operating system" that allowed the program to control card reader, printer, and disk drive.
On the IBM 1401, people had decks of program cards that did specialized things, like control the printer; you added them to your program. I'm sure Goldstein and von Neumann had something similar.
What I wonder sometimes, though, is whether this repetition of the same old idea, generation by generation, proves that "computer science" is essentially a dead topic?
Fixing bugs in the OS by regarding it as a PL (Score:2, Insightful)
For example, lots of cases where locks where aquired but never released, or aquired twice in sequence in the Linux kernel were identified by considering the sequence "lock(x);
I believe there was a Linux kernel subversion named after these guys, for finding a gazillion deadlocks and such bugs in an automatic fashion.
Take a look at their first paper [stanford.edu] on this.
They have a whole slew of updates to this at
Engler's web page [stanford.edu]. I believe there's a similar project at Berkeley as well.
Cheers,
bauzeau