Outils pour utilisateurs

Outils du site


issue115:critique_litteraire

Ceci est une ancienne révision du document !


Object Oriented Programming with ANSI-C par Axel-Tobias Schreiner (Programmation orientée objet en ANSI-C)

There is something about C that many of us can't let go of it. With the advent of programming languages such as Python and Java, many others have started to wonder, is C worth learning? Or, more importantly, is C as powerful as these relatively new languages? When I tried to break down what power actually meant, I stumbled upon things such as a standard template library, portability, etc, but the one that really caught my attention was object orientation. I thought it would to impossible to implement things such as inheritance and class level abstractions in a language like C, but then I came across this book called “OOC”. I have never, ever read a book like this one. What makes it special is that instead of throwing the class-like syntax at you, it dwells deep into the concept of abstraction. For the first time in my life, I was able to feel polymorphism taking over my code, and dynamic linkage creating a beautiful artwork of run-time resolutions. For those of you who don't know what that means, and have already had experience with an object oriented language, it's time you step back and wonder “do you really know how your code is working?”

Il y a quelque chose dans le ANSI-C qui empêche beaucoup d'entre nous de le lâcher. Avec l'arrivée de langages de programmation tels que Python ou Java, beaucoup se sont demandé si ça valait le coup d'apprendre C. Ou, pour beaucoup plus, si C était aussi puissant que ces langages relativement nouveaux.

Quand j'essaie de décortiquer ce que signifie réellement la puissance, je trébuche sur des choses telles que un bibliothèque de modèles standard, la portabilité, etc., mais le point qui retient avant tout mon attention est l'orientation objet. Je pensait qu'il serait impossible d'implémenter des choses telles que les niveaux d'abstraction de l'héritage ou du niveau de classe dans un langage comme C, mais, ensuite, je suis tombé sur ce livre appelé « OOC ».

Je n'ai jamais, jamais lu un livre comme celui-ci. CE qui le rend spécial, c'est que, plutôt que de vous balancer la syntaxe d'une pseudo-classe, il plonge au plus profond de la notion d'abstraction. Pour la première fois de am vie, j'ai été capable de ressentir le polymorphisme soutenant mon code et les liens dynamiques créant un beau motif de décisions d'exécution. Pour ceux d'entre vous qui ne savent pas ce que ça signifie, et qui ont déjà eu une expérience de la programmation orientée objet, c'est le moment d'un retour en arrière pour vous demander « Savez-vous réellement comment marche votre code ? »

What makes the book great altogether is that it is freely available. You can get a copy from https://www.cs.rit.edu/~ats/books/ooc.pdf, and start exploring the real power of C. Also the books spans just 221 pages. Before reading this book, projects with large numbers of files would scare me. If the file count went anywhere above five or six, I found myself perplexed by the complex distribution of work into modules. But now, I am working on projects with a minimum of 25 files. I understand it all now. The book often demarcates a conceptual topic into its 'type, api, and implementation' which makes working on big projects really easy. Once you learn to work with multiple files, it becomes easier to read code that others write because they would often do the same. The other specialty of this book is that every second or third chapter in the book is a fully fledged example of an application built using the concepts learned in the previous chapters. Dedicating an entire chapter to an example helps to explore it in detail. At the end of such chapters, one can expect to find exercise questions which build upon the application being worked on. At the end, the book also provides hints on awk programming - a pattern scanning and processing language.

Ce qui fait aussi toute le grandeur de ce livre, c'est qu'il est librement disponible. CVous pouvez en obtenir une copie par https://www.cs.rit.edu/~ats/books/ooc.pdf, et commencer à explorer la puissance réelle du C. Ce livre fait en tout 221 pages.

Avant de lire ce livre, les projets avec un grand nombre de fichiers m'effrayaient. Si le nombre diu fichiers dépassaient cinq ou six, j'étais perplexe devant le distribution complexe du travail en modules. Mais maintenant, je travaille sur des projets avec au minimum 25 fichiers. Je comprend tout maintenant. Le livre délimite souvent un sujet conceptuel entre ses « type, api et implémentation « ce qui rend plus facile le travail sur des gros projets. Une fois que vous avez appris à travailler sur des fichiers multiples, il devient plus aisé de lire du code que d'autres ont écrit, car ils ont souvent fait la même chose.

L'autre particularité de ce livre est que tous les deux ou trois chapitres du livre, un exemple complètement nouveau d'un application est construit en utilisant les concepts appris dans les chapitres précédents. Quand un chapitre entier est dédié à un exemple, ça aide à l'explorer en détail. À la fin de tels chapitres, nous pouvons nous attendre à trouver des questions de test construites à partir de l'application sur laquelle qui a été traitée.

À la fin, le livre fournit aussi de conseils sur la programmation awk - un langage d'examen et de traitement de motifs.

Table of contents is as follows: Abstract Data Types — Information Hiding Dynamic Linkage — Generic Functions Programming Savvy — Arithmetic Expressions Inheritance — Code Reuse and Refinement Programming Savvy — Symbol Table Class Hierarchy — Maintainability The ooc Preprocessor — Enforcing a Coding Standard Dynamic Type Checking — Defensive Programming Static Construction — Self-Organization Delegates — Callback Functions Class Methods — Plugging Memory Leaks Persistent Objects — Storing and Loading Data Structures Exceptions — Disciplined Error Recovery Forwarding Messages — A GUI Calculator

issue115/critique_litteraire.1481617088.txt.gz · Dernière modification : 2016/12/13 09:18 de d52fr