Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming IT Technology

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.)"
This discussion has been archived. No new comments can be posted.

Programming Languages Will Become OSes

Comments Filter:
  • Happened before... (Score:5, Insightful)

    by meringuoid ( 568297 ) on Friday January 17, 2003 @01:53PM (#5102833)
    ... the home computers of the early '80s didn't really have OSes, they had programming languages. You'd boot a BBC Micro and it would fire up into BBC Basic - with a few * commands for file system manipulation. Or you'd boot a Spectrum and you'd get the same: the name of the system and a prompt to begin typing your program.
  • Really? (Score:5, Insightful)

    by teetam ( 584150 ) on Friday January 17, 2003 @01:53PM (#5102839) Homepage
    While this may be conceptually true, there are different considerations involved when picking an OS and a language. A programming language is more like a tool that is selected because it is good for a particular operation.

    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)

    by p3d0 ( 42270 ) on Friday January 17, 2003 @01:57PM (#5102883)
    That's like saying doctors and scalpels are really the same thing because they both perform surgeries.

    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.

  • by rmayes100 ( 521535 ) on Friday January 17, 2003 @01:57PM (#5102886) Homepage
    Microsoft is always pretty quick to recognize new products that could threaten windows dominance. In some ways platform independent languages (most scripting languages, Smalltalk, Java) already implement their own OS on top of the OS they're already running on.
  • don't think so (Score:4, Insightful)

    by jacquesm ( 154384 ) <j@NoSpam.ww.com> on Friday January 17, 2003 @02:00PM (#5102905) Homepage
    This is *not* going to happen.
    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)

    by PourYourselfSomeTea ( 611000 ) on Friday January 17, 2003 @02:01PM (#5102918)
    Actually you see this reflected in modern systems designs such as Cocoa/OC or Java. They are in themselves virtualized operating systems. Adding classes in these adds reusable functionality to the overall system, much like adding functions in Lisp adds functionality to the system.
  • Re:Smalltalk as OS (Score:5, Insightful)

    by tpr ( 267368 ) on Friday January 17, 2003 @02:10PM (#5103004) Homepage
    It so happens that I know a bit about Smalltalk so perhaps I can help a little.
    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.
  • by MosesJones ( 55544 ) on Friday January 17, 2003 @02:21PM (#5103086) Homepage

    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)

    by g4dget ( 579145 ) on Friday January 17, 2003 @02:26PM (#5103119)
    UNIX had it right: put all the isolation stuff into the kernel, and put all the programming outside of it. It's called "modularity". Yes, you do pay a performance cost for it in some cases, but the benefits in terms of simplicity of design are tremendous. Determining what a process can do in UNIX is a fairly simple affair, as is limiting what it can do.

    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.

  • by gmarceau ( 119282 ) <dnys2v4dq1001@sneakemail.com> on Friday January 17, 2003 @02:33PM (#5103162) Homepage
    I see alot of people getting upset at Mathhew without having read the article. For them, and for those who are reading in diagonal, I'll summarise the important point here.

    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.
  • by Anonymous Coward on Friday January 17, 2003 @02:35PM (#5103177)
    So coffee is also an OS?

    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)

  • by Anonymous Coward on Friday January 17, 2003 @02:36PM (#5103187)
    Sorry, an OS provides access to hardware. It schedules every task on the computer. It provides IRQs, schedules memory access, etc. A programming language only provides librarys to make system calls to the kernal. An oS is also not equal to an environment (such as perl or Lisp).
  • by dillon_rinker ( 17944 ) on Friday January 17, 2003 @02:52PM (#5103297) Homepage
    who wants to code on a machine that can only use one language?

    The Feds. They've done it before (Ada) and, I'm sure, wouldn't mind doing it again.
  • Exactly (Score:4, Insightful)

    by acomj ( 20611 ) on Friday January 17, 2003 @02:53PM (#5103304) Homepage
    Microsoft was threatened by the java api. You only have to use the Java VM and on that platform your software doesn't have to use the windows api anymore. Takes away the advantage of developing on a operating system with a rubust api.
  • by Schnapple ( 262314 ) <tomkidd.gmail@com> on Friday January 17, 2003 @03:18PM (#5103567) Homepage
    If any programming language/framework has a chance it will become an OS it is .NET.
    Which, if it turns out to be true, explains why Microsoft is not only doing .NET but why they went out of their way and hired Corel to port the CLI and C# compilers to FreeBSD, Mac OSX, and (apparently) Linux (the Rotor project). It's been theorized that in the grand scheme of things .NET is helping Microsoft prepare for the day in which Operating Systems are irrelevant or at least not the way they're done today. And of course the complete class libraries the .NET framework relies upon will only run on Windows, and even when/if the open source reimplementations of them ever catch up, they'll still (in theory) always run best on Windows, to say nothing of the Visual Studio .NET tool always running in Windows.

    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).

  • by -dhan-101 ( 227087 ) on Friday January 17, 2003 @03:28PM (#5103649)
    your machine can already only use one language, machine language. fortunately, on top of this, humans have made a bunch of aliases and shortcuts for various commonly used sequences of operations, which developed into "higher level languages" like assembly and then C and then ...

    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).
  • by bokumo ( 169717 ) on Friday January 17, 2003 @03:35PM (#5103694) Homepage
    When you get down to heart of the matter, all computers use just one kind of language: the processor's binary instruction set. So you could make an argument that all (Von Neuman architecture) computers are just interpreters for a particular instruction set. Operating systems and programming languages just provide abstractions which make the programmer's job easier. Making a division between operating system and programming language is an engineering decision on where you want to position your layers of abstraction to achieve a good balance between ease of use and speed. It is all just a matter of where you decide to put your abstractions.
  • by iankerickson ( 116267 ) on Friday January 17, 2003 @03:41PM (#5103749) Homepage
    No, it's because the term "OS" is commonly used to mean "OE" or "Operating Environment". Linux, being the kernel, is an OS. sh, and all the other shell tools are the OE. You don't have to use sh for your shell or init or any other shell tools, replacing them with other valid executables. A real world example of this is the FreeVMS project. In making a free/libre version of VMS, they don't want to duplicate the work of writing drivers and developing a kernel -- they want to focus on developing analogs of DCL, TPU, the Queue manager, etc. So they're using Linux or FreeBSD for their kernel and writing their own userland.

    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.

  • by crmartin ( 98227 ) on Friday January 17, 2003 @05:04PM (#5104279)
    ... in this business you'll eventually hear everything twice (or more). If you look back to (eg) Parnas, et al, and the A-7 project, you'll discover that back in the late 70's and early 80's a key notion was that both the OS and the language were part of the "hardware hiding" layer.

    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?
  • by bauzeau ( 128909 ) on Friday January 17, 2003 @06:31PM (#5104899)
    A very cool instance of the duality has been under research at Stanford, in Dawson Engler's group. They look at kernel "rules" as a programming language, and then they run a compiler checker on it to catch semantic bugs.

    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); ...; relase(x);" as a language construct, and then looking for device drivers or modules that didn't abide by it.

    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

Those who can, do; those who can't, write. Those who can't write work for the Bell Labs Record.

Working...