Asembly vs. C , C++, Java

Status
You're currently viewing only magic_p's posts. Click here to go back to viewing the entire thread.
Not open for further replies.

magic_p

Ars Tribunus Angusticlavius
9,027
This statement was obviously not thought through very well. In general Computer Scientists "Ace-in-the-Hole" has been the fact that computer scientists can use abstraction. Using assembly language defeats that purpose. It does have it good points, being that with it you can talk directly to hardware and control basically everything.

However, it also has many downfalls. First, an assembly program gone wrong could easily overwrite your BIOS code for the motherboard or any other device that has a PROM (Programmable ROM) of some sort. This destructive nature also makes assembly dangerous. Given programming languages like C don't have much memory protection, the debugging environments and compilers will enforce some memory protection.

Take a class in modern operating systems. I guarantee after you are finished you will praise C or Java for what it can really do. I dare you to write a TCP/IP stack in assembly. "If" you have fingers left and you are still sane, and it works I'll give you a cookie, then tell you to write it again in C. The code will be so much easier to read and easier to write. Java is to the point where sockets are so well abstracted away that you declare one, then use a few member functions to write and read from the socket.

A few hours after reading some RFCs and you have an http server.

The one thing that makes high level languages so powerful is that you write a function, make sure it works correctly in all situations, then build on top of that. The abstraction and ability to do that is a power tool. Without abstraction we wouldn't have any of the modern operating systems we have now, and the code for them would easily be hundreds of times larger and more complicated. You also woulnd't have fixed the Y2k problem on time. Can you imagine sifting through assembly code that you didn't write and figuring out what is going on? I have enough trouble going through COBOL code. Assembly is even worse.

It's not a coincidence that sockets were invented just after the C programming language was invented. C was the first langauge powerful enough to create something liek sockets. Assembly would be too complicated.
 
Status
You're currently viewing only magic_p's posts. Click here to go back to viewing the entire thread.
Not open for further replies.