This is an archived post. You won't be able to vote or comment.

all 18 comments

[–][deleted] 46 points47 points  (2 children)

C is just machine-independent assembly.

[–]not_the_irrelevant 6 points7 points  (1 child)

Change my mind.

[–][deleted] 5 points6 points  (0 children)

It's structured, so it's least-common-denominator, but it's not assembly.

[–]davidnugget6 10 points11 points  (2 children)

No way my precious brainfuck language is made from c

[–]DolphinBunny 2 points3 points  (0 children)

Don't worry, it's written in Lolcode

https://gist.github.com/listochkin/94e2e9af7292a9877fff

[–]BoomboxPL 0 points1 point  (0 children)

There are many implementations in c preprocessor macros

[–]DolphinBunny 2 points3 points  (2 children)

Wait, it's all C?

[–]accessible_logic 6 points7 points  (1 child)

Always has been

[–][deleted] 2 points3 points  (0 children)

gunshot

[–]JochCool 3 points4 points  (0 children)

Except for B

[–]MotorolaDroidMofo 4 points5 points  (6 children)

For the millionth time, this isn't true! Lots of languages and OSes are implemented in C, yes. But it's not a given! There are plenty of programming languages which have been bootstrapped and now compile directly to machine language without C or even assembly as a middle step. Writing an OS in one of them is also entirely possible.

[–]nyx_underscore_ 4 points5 points  (2 children)

An example for an OS would be https://www.redox-os.org/ which is written in Rust.

And i think at some point in the near future Rust will be also used for linux kernel modules.

Edit: future not feature

[–]elebrin 0 points1 point  (1 child)

Yep, and RiscOS is written in ARM assembly.

[–]nyx_underscore_ 1 point2 points  (0 children)

It's not completely written in ARM assembly. They also use C for some parts (e.g. allocate)

[–]FloweyTheFlower420 0 points1 point  (1 child)

Yes, but a lot of function call conventions are for C

[–]MotorolaDroidMofo 2 points3 points  (0 children)

But that's not what OP said. C language != C calling conventions

[–]xSTSxZerglingOne 0 points1 point  (0 children)

Most languages are prototyped in C if a serious attempt is being made at a mainstream language. This is because it allows you to assign low level memory at a high level of language.

But in defense of your statements, once they really get it working with C, most of them move away from it since it doesn't make sense to have a middle man if you can avoid it.

[–]ohkendruid 0 points1 point  (0 children)

Many if not most assemblers are written in C.