Contents:
Test Organization Accepting Command Line Arguments Reading a File Refactoring to Improve Modularity and Error Handling Working with Environment Variables Functional Language Features: Iterators and Closures Processing a Series of Items with Iterators Comparing Performance: Loops vs. Iterators More about Cargo and Crates.
Customizing Builds with Release Profiles Publishing a Crate to Crates. Cargo Workspaces Installing Binaries from Crates. Extending Cargo with Custom Commands Smart Pointers Using Box to Point to Data on the Heap Running Code on Cleanup with the Drop Trait Rc , the Reference Counted Smart Pointer RefCell and the Interior Mutability Pattern Reference Cycles Can Leak Memory Fearless Concurrency Using Threads to Run Code Simultaneously Shared-State Concurrency Extensible Concurrency with the Sync and Send Traits Object Oriented Programming Features of Rust Characteristics of Object-Oriented Languages Implementing an Object-Oriented Design Pattern Patterns and Matching Pattern Syntax Advanced Features Unsafe Rust Advanced Traits Advanced Types Advanced Functions and Closures Macros Building a Single-Threaded Web Server Graceful Shutdown and Cleanup Appendix A - Keywords B - Operators and Symbols C - Derivable Traits D - Useful Development Tools E - Editions F - Translations of the Book Light default Rust Coal Navy Ayu.
Common Programming Concepts This chapter covers concepts that appear in almost every programming language and how they work in Rust. This does not necessarily mean your course grade will be a 'D' or an 'F'. Your grade is not determined by how hard or easy the assignments are. If there are many students in the class, a normal distribution of scores would be expected, Generally in a large class, I think the average numeric score is roughly equivalent to a B- letter grade.
A First-Order Functional Language. The order in which steps are taken matters did we print the number before or after we incremented it? This is partly a matter of personal taste and partly a reflection of the kind of work I usually do. Overview A large variety of modern technology, from mobile devices and personal computers to datacenters and entire infrastructures, are programmable. Become a member. S AN "yellow" N "cat" V "runs". The following Python code is an imperative way to read in a CSV file containing demographic information and then calculate the average age of all people in each state:.
In a senior class often an average score will be a B letter grade or betterm and a third of class will get an A letter grade. However, occasionally the cutoffs move the other way. A rough way to tell how you are doing in the class is: above average numeric score means A or B, below average means C or D. The letter grade for the class will be assigned to each student at the end of the semester. Cutoffs based on the weighted sum of these numeric scores will determine the letter grade. Sometimes I have to make some very tough choices; invariably someone in the class must receive the highest B, the highest C, etc in the class.
Your best strategy is to not make it close. For each student the numeric scores for the assignments and exams are recorded. If you have any question about your standing in the class, or if some score has been recorded wrong, please contact me. Students are expected to take the final exam at the scheduled time during finals week.
Academic misconduct, such as representing someone else's work as your own, will result in a grade of 'F' for the class. Please read the CS honor code. If you receive ideas, code, or help from any source, be sure to give proper credit and acknowledgment. Please note that all course work homework, projects, exams, etc is archived.
This is done for two purposes: for review by accrediting agencies for the purposes of maintaining the accreditation of the CS program , and to detect plagiarism. There will be several projects in this course. The projects are not especially hard, but learning new languages takes time.
Leave time to experiment and learnthat's the point of the projects. Do not wait until the last week to start the projects. It is wise to write at least one simple program in the language, before starting the project. Writing a correct program is important, but learning to do it yourself is more important.
Do talk to other students about solving the problems and about learning the languages, library, compilers, and program development tools. Do use the computer science CS help desk. Do not look at other students' current or previous code for the projects.
Do not spend your time searching for the project solutions on the Internet. Do not allow other students current or future to examine or copy your code for the projects. Do not buy and sell solutions to the projects.
The book Programming Language Concepts (PLC) covers basic concepts such as abstract syntax, interpretation, stack machines, compilation, type checking. Pages in category "Programming language concepts". The following 22 pages are in this category, out of 22 total. This list may not reflect recent changes (learn .
Do not denigrate the honest work of other students by valuing the "answer" to the project over the learning of the language. All programs are analyzed and a measure of similarity with other programs from many sources is calculated. Projects whose programs are very similar to other programs will receive no credit. This policy is necessary to ensure that students take reasonable action to avoid and prevent plagiarism, and to ensure the proper recognition of independent effort. You may work together with another student in the class on the programming projects.
Groups can be no more than two people. Please do not work with the same person twice. Include your name and e-mail address in all program files you submit for the projects.
Do not include your student number. If you are working together, make sure your partner's name is also in the file. If you receive help from any source, you must include a note to that effect in the header. Projects are due at midnight. You may turn them in later at your own risk, but as soon as grading begins, no later assignments are accepted.
Assignment turned in early might get some feedback which may improve the score. Do not cheat on the exams; do not ask for or give code to others; do not buy or sell the solutions to the projects. Do not make solutions publicly available. The penalty for academic misconduct is a grade of 'F' for the course. Discussions with your classmates, with teaching assistants, at the help desk, or academic support center are encouraged. Know how to do exercises, know how to ask for help, and know how to help each other. Without student cooperation, the importance of course grades for individuals diminishes, as does the incentive for learning by doing it yourself.
Please discourage your peers from cheating. You have more influence than I do. If you have evidence of academic misconduct, you should bring it to the attention of your instructor, or the department head. Please note, that copies of some work homework, projects, exams, etc for classes may be kept on file. This is done for two purposes.
Reading assignment. Sebesta 11e, Chapter 1: Preliminaries Week 2 History of programming languages. Study of language. Scott 4e, Section 2.