Timeline for Is every language written in C?
Current License: CC BY-SA 4.0
29 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S Jun 28, 2019 at 13:50 | history | suggested | Gilles 'SO- stop being evil' | CC BY-SA 4.0 | the lambda calculus was designed as part of exploring alternative foundations of mathematics to set theory (it came up at https://cs.stackexchange.com/questions/111217/lambda-calculus-as-a-branch-of-set-theory) |
| Jun 28, 2019 at 0:48 | comment | added | Ben I. | To expand a bit on where @AndrejBauer is coming from, there was a follow-up question (by me) about this question here | |
| Jun 27, 2019 at 21:52 | review | Suggested edits | |||
| S Jun 28, 2019 at 13:50 | |||||
| Jun 27, 2019 at 13:08 | comment | added | Andrej Bauer | It is false that "The functional paradigm, for example, was developed mathematically (by Alonzo Church) as a branch of set theory long before any programming language ever existed". You are probably referring to $\lambda$-calculus, which was indeed invented by Alonzo Church, but it has nothing to do with set theory. It was one of the earliest descriptions of what it means to "compute", as a formalism on its own, quite unrelated to set theory. It was very influential in the development of computability theory and later of programming languages. | |
| Sep 22, 2017 at 20:49 | comment | added | Rob K | That cc was compiled with cc was vital to Ken's Famous Hack | |
| Mar 11, 2015 at 20:57 | comment | added | greyfade | @JonathonWisnoski: Yes, and I tried to make that clear: Until you have a working compiler, it's not possible to write a compiler for a language in that language. It's the chicken-and-egg problem. Others have pointed out that you can "compile" a language by hand, but that's still writing a compiler in another language, just with the extra step of translation. But the goal of most languages is to ultimately self-compile the compiler in the language, as nearly all C compilers do today. | |
| Mar 11, 2015 at 19:40 | comment | added | Jonathon | From what I have been told by CS teachers, it is possible to write a language with itself. I guess you probably need a little assembly/other to bootstrap yourself, but the idea is that you can bootstrap yourself if planed correctly. | |
| Dec 29, 2014 at 1:27 | comment | added | greyfade | @BasileStarynkevitch: If something can not be done in portable C, then it can not be done in non-portable assembly language. By your assertion, Haskell can't exist. No, continuations, closures, etc., can all be simulated straight-forwardly using well-known and common techniques. Realize that all of those things you named can be done just by clever manipulation of stack allocations (with the exception of closures, which can be done trivially on the heap; remember that C++ recently got closures and is getting continuations in a future standard, both of which already exist in libraries.) | |
| Dec 28, 2014 at 21:43 | comment | added | Basile Starynkevitch | Because there are a lot of things that cannot be done in portable C (continuations, closures, stack introspection, tail-recursion, ...) and could benefit from another low level language. See e.g. GNU epsilon | |
| Dec 28, 2014 at 21:42 | comment | added | greyfade | @BasileStarynkevitch: Why? | |
| Dec 28, 2014 at 20:06 | comment | added | Basile Starynkevitch | I still find that quite strange.... | |
| Dec 28, 2014 at 20:03 | comment | added | greyfade | @BasileStarynkevitch: This is why C is called the lingua Franca of programming. It's so ubiquitous that it's the standard for all FFI, so it's nearly impossible to find a language that doesn't have a C interface of some kind. If there is a modern language that doesn't use C somewhere, I don't know of it, but ML dialects and languages like Fortran and Pascal have historically minimized the presence of C, either by predating it or because they're effective systems languages already. | |
| Dec 28, 2014 at 16:46 | comment | added | Lightness Races in Orbit | @Michael: "isn't 'C but with C++ features' sort-of the definition of C++" NO! | |
| Dec 28, 2014 at 14:15 | comment | added | Basile Starynkevitch | Strangely, on Linux, I know no language implementation which does not depend or use any C code (in user land). One could "easily" implement a bootstrapped language compiler which emits e.g. an ELF executable (with direct syscalls), but I cannot name any such free software on Linux. Do you know some? (all implementations of Ocaml, Scheme, Haskell I heard of have some part -usually their runtime & GC- coded in C; Scheme 48 is bootstrapped, but generates C code). | |
| Dec 26, 2014 at 0:21 | comment | added | greyfade | @mathguy54: There are more than one implementation of each, but: OCaml is bootstrapped with C and written in its own ML dialect. Glasgow Haskell is written in Haskell and compiles to C. There are hundreds of Scheme compilers, some written in C, some in Scheme, some in ML, several in JavaScript, and many others. The goal of most languages is to be self-hosting, so that they can compile their own source code. C is a common starting point, but it is by no means the only one. | |
| Dec 25, 2014 at 21:04 | comment | added | joshreesjones | What are OCaml, Haskell, and Scheme written in? | |
| Dec 24, 2014 at 7:28 | comment | added | Francis Davey | When I was at university the idea of obtaining C for use on the mainframe was being discussed (it arrived while I was there). There were lots of languages to program in before it was ported across. I've always thought of C as a kind of "new" language as a result. | |
| Dec 23, 2014 at 19:09 | comment | added | Gabe | The original C++ compiler (called cfront) really compiled to C. That is, when you compiled a C++ program, you got a C program, which you then compiled using a C compiler. So you could definitely say that C++ was originally written in C. | |
| Dec 23, 2014 at 17:56 | comment | added | Daniel R Hicks | @reirab -- IIRC, Wirth's Algol W compiler was originally written in Algol W, then hand-translated into assembler to "bootstrap" it. | |
| Dec 23, 2014 at 17:00 | comment | added | Cubic | @Michael well, sort of. C++ hasn't been a true superset of C for a while now though. greyfade it could have been written in C. There just wouldn't have been a programmatic compiler for it, so it would've have to have been translated by hand, which is a huge pain. | |
| Dec 23, 2014 at 12:52 | comment | added | KutuluMike | @greyfade isn't "C but with C++ features" sort-of the definition of C++? | |
| Dec 23, 2014 at 8:24 | comment | added | greyfade | @MichaelT: To be fair, most of it is still basically C, but depending on C++ features. That's what I mean. | |
| Dec 23, 2014 at 4:26 | comment | added | user40980 | @greyfade gcc hasn't been C for some time. It is not "now being rewritten" it is "has been written in C++ for over two years" (its even older than that though, thats when the merge happened that moved it to C++). | |
| Dec 23, 2014 at 1:36 | history | edited | greyfade | CC BY-SA 3.0 | clarification of C's origin |
| Dec 23, 2014 at 1:35 | comment | added | greyfade | Of course, GCC is now being rewritten in C++, but that's not as important as the fact that the first C compiler couldn't be written in C. | |
| Dec 22, 2014 at 23:30 | comment | added | Dani | @reirab Posible AND true. GCC is written in C and usally compiled using GCC. | |
| Dec 22, 2014 at 15:14 | comment | added | reirab | While it's true that the first C compilers obviously couldn't be written in C, it's certainly possible now. | |
| Dec 22, 2014 at 9:56 | vote | accept | FaizanHussainRabbani | ||
| Dec 22, 2014 at 8:59 | history | answered | greyfade | CC BY-SA 3.0 |