News for hackers. Stuff that matters.
Re:Why learn C? by gaius on Thursday June 28, 2012 @11:20AM (#4172081)
FORTRAN is simple, for instance. Yet we don't use it much any more.

Computing is like an iceberg, with the web being the bit above the surface.

rich enough that you don't go bananas solving large, interesting problems [assembly]

Two words: macro assembler. It may surprise you to know that not that long ago, sophisticated GUI apps were written in assembly language (in fact the IDE I use on my ST, Devpac, was written in assembly, and it's everything you would expect of a modern IDE - editor, compiler, debugger, etc - running under GEM). Many games were written in pure ASM.

Re:Why learn C? by kabdib on Thursday June 28, 2012 @12:09PM (#4172363)
I've done macro assembler. (Hell, I've written a couple). I know all about macros. C is not just a fancy macro assembler.

This doesn't get you away from the ooky stuff that C does for you, like register allocation and code optimization (link time code generation is a wonderful thing, even for C). Very few assmeblers are bright enough -- or should be trusted enough -- to do code motion, strength reduction, common subexpression analysis. And, oh bog, just writing a plain expression? Not even possible in a macro assembler.

[I rewrote the ST's file system in assembly, btw. It started out as an honest effort, then got bogged down in stuff that would have been a no-brainer in C.]

Re:Why learn C? by johnm on Thursday June 28, 2012 @11:47AM (#4172238)
Indeed and even more... The entire GEOS operating system, gui/windowing system, application suite, and the vast majority of the rest of the apps were written in 8086 assembly language and ran on an original IBM PC.
Re:Why learn C? by gaius on Thursday June 28, 2012 @02:39PM (#4173177)
Even business apps on mainframes were written in assembler... In fact a quick Google shows they still are! http://www-01.ibm.com/software/awdtools/hlasm/library.html?S...
Re:Why learn C? by Someone on Thursday June 28, 2012 @06:56PM (#4174382)
There are a few niches where new code is written in assembler (numerical code, parts of standard libraries), but in general, I think 'maintained' is a better word to use.
Re:Why learn C? by gillianseed on Friday June 29, 2012 @09:16AM (#4176432)
I don't think you have to go all the way back to the ST,Amiga era, I recall there was a surge of Win32 assembly after that with some nice assembly applications as the result. However with the level of optimization offered by compilers today, these days assembly seems mainly relegated to where it's fine-grained control allows for better performance in extremely performance oriented parts of code. An example of such would be SIMD code where highly fine-tuned assembly code often runs circles around the compiler generated equivalent, as proven by simply comparing x264 performance with or without assembly optimizations.

Personally I haven't done any assembly programming in atleast the past 6-7 years but I still get the urge now and then to program in it again. However, even though it's unlikely that happens, my assembly experience has given me a thorough understanding of how the computer works at a basic instruction/memory level which has been extremely valuable when I want to create optimized code in higher level languages (like C). So yes, while learning C is certainly worthwhile even if you are going to write in even higher level languages, learning or atleast graping the fundamentals of assembly is in my opinion even better.