Seeing the Assembly Through the Cs

People always say that one of the important attributes of the C programming language is that you can look at the code and very clearly see the assembler that the compiler will produce.

But (I think) ever since I did assembler in class, no matter the language, I could see/map it to how the compiler would translate it to assembler.

In fact, it bothered me to no end. When I was learning Perl, it was very difficult at first to learn to trust the interpreter to take care of large swathes of the task, to let go of control. I could see all of the horribly inefficient things it must be doing behind the scenes (‘what do you mean, dynamic typing?!?’), and for a long time, my Perl would read very much like my C[1].

But then I discovered regex.[2] And learned about premature optimization.

Now my bash commands read like my Perl.

[1]It probably still does, but it’s starting to bleed back now. I’m now reminded of the dangers of buffer overflows whenever I use scanf.

[2]If you are reading this, you likely will have seen Regex Golf, or the first (that I saw) Regex Crossword. (LOOK THEY MADE MORE. THIS IS AMAZING.)

Leave a Reply

Your email address will not be published. Required fields are marked *