News for hackers. Stuff that matters.
Re:Best aspects of C by witherk on Tuesday November 17, 2020 @01:22PM (#25127464)
I'm enrolled for a masters at Georiga Tech right now and last I checked the OS course is in C, I would kinda prefer to learn rust anyway so I hope you are right.
Re:Best aspects of C by bluecalm on Tuesday November 17, 2020 @02:47PM (#25128701)
Why would you prefer to learn Rust at this point, especially during OS course when all relevant OS code you will encounter is in C and understanding C is crucial to understand low level programming concepts. You can always learn Rust later when/if it becomes more relevant. Without C a lot of programming areas will be a closed door forever.
Re:Best aspects of C by jcranmer on Tuesday November 17, 2020 @03:42PM (#25129531)
> understanding C is crucial to understand low level programming concepts

That is a patently false statement. To understand low-level programming concepts, you need to understand fundamental notions about how machines represent state in registers and memory, how memory is organized (including primarily the concept of function calls and the stack), and the indirect referencing of memory via pointers. Note that nowhere in that list did I describe a concept that is unique to C.

In fact, one of the more common approaches to introducing developers to low-level programming is to introduce them to these concepts via assembly (say, Nand2tetris). In my own experience TA'ing such a course, I am more than willing to translate code into whatever language the student is most comfortable with to express the concepts as necessary. You can absolutely learn these concepts in other languages, and my own suspicion is that unsafe Rust does a slightly better job of it than regular C does.

C does not have a monopoly on understanding the low-level organization of code, and quite frankly, C's lack of coverage here can be frustrating. C has no concept of multiple return values, functions with multiple entry points, unwinding the stack, computed goto, SIMD vector types, nested functions, discontinuous structures, or tail calls, and these are all concepts that are present in other languages that cannot be expressed in standard C or often even in vendor-extended C.

Re:Best aspects of C by ghostwriter on Tuesday November 17, 2020 @04:40PM (#25130270)
> You can absolutely learn these concepts in other languages, and my own suspicion is that unsafe Rust does a slightly better job of it than regular C does.

> C has no concept of multiple return values, functions with multiple entry points, unwinding the stack, computed goto, SIMD vector types, nested functions, discontinuous structures, or tail calls, and these are all concepts that are present in other languages that cannot be expressed in standard C or often even in vendor-extended C.

ATS does a better job than safe Rust and you can think of it as a vendor-extended C (http://ats-lang.sourceforge.net/DOCUMENT/INT2PROGINATS/HTML/...).

Re:Best aspects of C by steveklabnik on Tuesday November 17, 2020 @01:29PM (#25127563)
https://tc.gts3.org/cs3210/2020/spring/info.html

Dunno how often this class runs, and if it was just for one semester or more than that.

Re:Best aspects of C by jcranmer on Tuesday November 17, 2020 @01:35PM (#25127673)
GT just switched over in the spring semester, I believe.