My proposed change is to the C++ programming language. I propose that strings be made a primitive data type. Strings are used entirely too often to be some object that you have to include and implement. I believe that it would make things so much simpler this way. The extra time put into implementing a string could be put too much better uses. Strings are already a primitive type in many different languages. C++ is the only language that specifically makes you include the string class. Even java will automatically import the class at least. To actually have a string class, though, is unnecessary. Strings are so commonly used that it should be implemented in the compiler. The only reason you need a string class is for string manipulation.

            Before my proposed change String code looked something like this.

 

#include<string>

#include<iostream>

 

int main() {

string<char *> a = “Hello world”;

cout << a << endl;

}

 

And that’s only if your using the standard template library more commonly it’ll look something like this.

 

#include<iostream>

 

int main() {

            char a[12] = “Hello World”;

            cout << a << endl;

}

 

Making sure that the character array includes enough room for the null character at the end. These methods are both obscure and pointless. There is no reason why the code couldn’t look like this.

 

#include<iostream>

 

int main() {

            string a = “hello world”;

            cout << a << endl;

}

 

I’m not necessarily proposing something that will really shorten code. I’m just thinking that they should use something a little more intuitive. I’m also not saying that they should get rid of the old methods altogether. For certain applications it’s much easier maybe even necessary to use character arrays or the template. I just think that for the other ninety percent of the time it would be much simpler to use strings has a primitive data type. To have to remember that null character or to initialize an object every time you want to use a string just seems kind of counter intuitive for something that’s used so often. In short I think that there is nothing to lose and everything to gain by this change. Viva la resistance.