09.28.06

thus spake Scott Meyers – what is C

Posted in Uncategorized at 4:37 pm by zhouji

“C is a fairly simple language. All it really offers is macros, pointers, structs, arrays, and functions.”

Meyers’s books is great, but you still should read Stroustrup’s first

快乐的科学

Posted in Uncategorized at 1:30 pm by zhouji

The Gay Science by Nietzsche

I read it many years ago (around 1986) in Chinese.
first published in 1882. Nietxsche said it is the most personal of all his book. It has most of his poetry. In German, it is “Die fröhliche Wissenschaft“.

here is a selected text in English. totally five books. I didn’t find a full text on the Internet.

Here I would translate just a few lines, from English to Chinese myself. Just as an exercise and having fun.
第一卷

存在的目的的教师-当我反思所有的好人和坏人,我发现他们都是专注于一个使命-所有每一个人都一样-就是尽量保存人类这个种族。这并非出于对这个种族的热爱,而是因为这种本能比任何东西都更古老、坚定、不可改变、不可征服-因为这种本能正是我们这个种族、这个群落的本质。

thus spake Stroustrup – what is a friend function

Posted in Uncategorized at 11:32 am by zhouji

An ordinary member function declaration specifies three logically distinct things:

  1. The function can access the private part of the class declaration, and
  2. the function is in the scope of the class, and
  3. the function must be invoked on an object (has a this pointer)

By declare a member function static, we give it the first two properties only. By declaring a function a friend, we can give it the first property only.

The C++ Programming Language (ISBN0201889544): the generally acknowledged “bible of C++”