Pythonify qlang

An unknown feature in Qlang is that you can define operators, and the thing I miss most about python is the ability to add strings together.

With the following code you will be able to add strings together in qlang as well.

string operator + (string str1, string str2)
{
    return strcat(str1, str2);
}
3 Likes

I thought we were getting away from Python style? Next we put “auto” in front of all functions with returns, to mimic non-typed?
:wink:

1 Like

Dear followers,
The compiler hears praise. Starting from the Quantlab version 3.1.4134, the “+” operator will be recognized as a valid way to concatenate strings. It has even been optimized to be fast. Enjoy.

ps. original release note:
“qlab: operator+(string, string) (the cat’s out of the bag).”
ds.

2 Likes

That seems like a good addition.

Glad you approve! Welcome to the forum. Do not hesitate to post any questions or tips you might have.

1 Like