My Biggest Problem With C++
February 15, 2020•373 words
My biggest problem with C++ is not an issue with compilation of simple code, that can run very quickly on your machine. For many people, this is enough to make the language absolutely invaluable in their processing. My biggest issue with C++ is that there aren't simple straight forward commands to do basic things like removing newlines from coding, or doing string substitution in order to insert the strings from read files into another strength for natural language.
For example, the most natural way for me to generate a chat bot dialogue line in Ruby, is by involving an element of string substitution when writing dynamic dialogue ( that is, dialogue that grows over time based on what it writing appended on top or bottom of ( but not through ) older lines of dialogue, so that what it says grows over time in a natural way:
#{bot_name}: My name is #{bot_name}, is #{your_name} your name?
#{bot_name}: I have a pet #{bot_pet}, can you tell me your pet?
#{bot_name}: I work as a #{bot_job}, what do you do for a living?
And so on, so that what is substituted is a random element read from a file, and then through something like naivebayes, determine whether that line of dialogue makes sense in that specific context. This also exists in Python, although it is structured slightly differently: {botname} as suppose to #{bot_name}.
Often this might mean awkward construction like:
cout << "My name is " << bot_name << ", is your name " << your_name << "?";
You get the idea. There doesn't seem to be a way to substitute lines from read lines directly into other strings. This completely subverts engineering design in a lot of systems that I am currently developing, as much of the stuff is reliant on string substitution in crafting a natural sounding chatbot with TTS.
I am however completely willing to switch over to C++ provided that they find a way to actually implement proper string substitution, and I'm not reliant on the countless awful tutorials for it online.
It also completely subverts other natural language type machine learning that I want to do in the future, such as with evaluating trends and translation.