clairec

Untitled

Apr 5th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 KB | None | 0 0
  1. If I had a choice, I would teach this course mostly in Haskell with some pointer-based data structures and algorithms implemented in C. Haskell, being very mathematical, makes the algorithms and their logical requirements much clearer, and using C would allow me to discuss precisely the time and memory requirements of the program, as well as the details of pointer manipulation and ephemeral data structures, without having to deal with a whole range of less-important matters of program organization, reuse, etc. In fact, the most famous computer science books of all -- Donald Knuth's series, The Art of Computer Programming -- which cover all aspects of data structures and algorithms in computer science, uses an assembly language as its primary language. Knuth has defended his continued use of assembly language because he wants to be able to be very precise about the analysis of time and space usage of the programs, and this becomes more difficult in a higher-level language.
  2.  
  3.  
  4.  
  5. Unfortunately, learning the ideas behind data structures and algorithms, and the analysis connected with them, are not the only goals of this course; we are also trying to prepare you for a career in the field, and so you should also get some detailed knowledge of mainstream languages and how to use them effectively for a variety of purposes. This is the reason that C++ is taught in 40 and 41, and the main reason I am using it in 115. However, as a compromise between my two goals, the pedagogical and the practical, I am only using the older core C++. You've probably already realized that C++ is monstrously complex, with lots and lots of fine details, and C++11 and C++14 for the most part just add complexity to the language, rather than take it away, and so they go even further away from my ideal -- although I grant that there are a few things that these later versions make simpler.
  6.  
  7.  
  8.  
  9. As a side note, let me point out that Haskell is actually steadily growing in popularity in industry, with a number of companies using it as their main development language (the spam filters for Facebook are written in Haskell, for example), and I predict that once AI starts taking over low-level programming jobs, the programmers that remain will be more aptly called "specifiers", since they will specify the behavior of the systems they create using precise specification languages and let the AI figure out how to implement these specifications efficiently, using a huge range of specialized knowledge that not any single programmer could possibly maintain. And these specification languages will look a lot more like Haskell and Prolog than they do like C++, so you guys are ahead of the curve.
Add Comment
Please, Sign In to add comment