Monday 24 June 2013

Into the deep

I had another productive day; the code size is increasing at a rapid pace. Today I implemented arbitrary addition of myint, and also a new test class mylong. This very similar to myint, the main point being to test that we can do mixed addition (i.e. adding a myint and a mylong and getting a mylong).

I am now reasonably convinced that the basics are working, and tomorrow I will start implement the mpz class is some completeness (excluding contexts for now, but with addmul etc).

With the increased complexity I am also hitting an expected problem: the C++ template system really was not designed to be (ab)used in this way. The main ramification of this are atrociously long and hard to understand error messages. I have been remedying this problem to some extent by using clang for debugging compiler errors -- clang's diagnostics are far superior to gcc's.

2 comments:

  1. Great. You had me on the edge of my seat for a minute. I thought you were already going to report that there were compiler bugs!

    ReplyDelete
  2. No I'm not that far down, yet. But then I'm currently developing on gcc 4.7, and testing every now and then with gcc 4.6 and clang 3.4. I dread the point when I will have to investigate other compilers.

    ReplyDelete