Thursday, June 15, 2023

Doing something

 Kind of realized that some times, doing something can distract you from getting something done.

I had decided that I needed an interface then found the INumber generic interface. However, I still hadn't done the work to decide what I needed or how I was going to make it work.

So, lets do that now.

What is a number. It is a value, a quantity. Mathematicians have determined that these values have certain properties, main among them, that they can be discussed in a meaningful way separate from the object that they are describing the quantity of. Mathematically 19 oranges, is the same as 19 inches, is the same as 19 days, which is the same as 2013 math nerds (2013 is 19 expressed in base 3, will get to bases later) (and you can find 19 math nerds in the same place, though it usually a math class, or a comic con).

So, what does a number data type need. INumber says 50 some functions, and it is right to some degree. However, those functions tell us attributes of the number or defines ways to interact with other numbers, but the most important thing is the value. It is a data type and we need to have the data. What is the data with a number, well the value. So, how do you store the value? Well, that was some of what I wanted to explore with this project. With the OutrageousInt I started with, the value is an int. And yes, I'm wrapping an int in an unnecessary class, but this whole thing is in and of itself, unnecessary. I am doing it to try and learn something, and experiment with algorithms and maybe help someone else.

Now, does the value have any properties, or need any properties to ease calculation or interaction with other classes implementing INumber? Well, that is the question, but perhaps I need to start with a naïve implementation. Currently, I believe that my int version is finished or close to it, so maybe I need to create a unit testing project to be used on the OutrageousNumbers, and perhaps some sort of simple app to play with the numbers. 

No comments:

Post a Comment