Re:C0, an Imperative Programming Language for Novice Compute...
by grayhatter on Wednesday October 18, 2017 @12:08PM
(#15500330)
I've replied here https://news.ycombinator.com/item?id=15500321 I think I mean to reply to you.
Re:C0, an Imperative Programming Language for Novice Compute...
by networthless on Wednesday October 18, 2017 @03:18PM
(#15502081)
Say hi to Isabella for me
1. Contracts in C0 bake preconditions, post conditions, and loop invariants right into the language. Contracts are only checked when in "dynamic recompilation" mode (basically debug mode). This allows you to check the correctness of your code more easily (and, importantly, in an easily gradable way).
2. The language is designed in such a way to introduce C to programmers that are used to other higher level languages. In the C0 phase of the course we introduce students to fundamental concepts like memory allocation, code reasoning and contracts, binary representations of numbers, and unit testing. Next we transition to C1 (included in the C0 install) which introduces typedefs and other features of C. At this point we focus on introducing data structures. Finally we make the final transition to C, where we talk about undefined behavior, gcc, stack vs heap, etc.
I've taken this course myself, and I would argue that this measured approach to learning C is far superior to throwing students (most of whom have no low-level programming experience) straight into C.