Last night was turning the pages of Electromagnetic Engineering reference guide and had my eyes glued to the Vector and Scalar calculus. I thought it would be a good idea to have Vector datatype in Programming languages. I know, some of you might already have thought about the usage. The one which immediately hits my mind is in data crunching. Say in reporting Sales of a company. The direction of the vector can be used to show in which direction the business is heading. The same is done currently also but somehow I feel inbuilt vector datatype will make life more easier. Am trying to get a real life scenarios which proves my point. What u guys have to say?
Add your comment
Just a quick correction - I assume you mean a new Vector datatype (there are existing Vector datatypes that are basically arrays)... a kind of primitive Vector datatype?
ie
2d vectordirectionforce
3d vectorxy_directionz_directionforce
Would be very useful but the OOP paradigm and 'base' for all programming languages will only contain the fundemental building blocks with which the programmer can then define everything else.
You can easily define vectors yourself :)
The future in Programming Languages will be IOP (Individual Oriented Programming) not OOP, and a vector of parameters (and types) of the problems.
struct vector{ char* vect;};
There. Your data type is now defined. You can make each element in the vector be whatever primitive type you wish. Obviously, this silly and incomplete example can be coded in just about any language.
The trouble doesn't come in the representation of the data on the system, the problem comes in efficient algorithms to do the math. I believe the best we have now are some polynomial-time, dynamic-programming algorithms to determine the legal order of operations that produces the least number of machine operations. You don't see any real improvement in speed until you are doing operations on thousands of HUGE vectors.