Wednesday, October 29, 2008

bjarne stroustrup

i had a hunch that i had to understand the mind of this man, bjarne stroustrup, in order to have any clue about this strange language c++, so i'm reading "the c++ programming language", and i think i was right.. here's an example that strikes me:

This form of explicit type conversion is inherently unsafe and ugly. Consequently, the notation used, static_cast, was designed to be ugly.

and it's not that i disagree! casting should be ugly. all of this ugliness has reasons for its ugliness. i'm increasingly convinced that c++ does indeed make some sort of sense! it has a perspective and it makes sense from that perspective. that's what i've been looking for.

hmm, i think my program has heard of itself?!

r-2:~/code/gccstudy ixkey$ g++ experi.cpp -o experrr
r-2:~/code/gccstudy ixkey$ ./experrr
hello this ihello this is the testhello this is the test array! ٰ?p???4??????4???p???