Timeline for Is placing text markers inside of strings bad style? Is there an alternative?
Current License: CC BY-SA 3.0
16 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 22, 2016 at 12:21 | answer | added | Phill W. | timeline score: 0 | |
| Nov 21, 2016 at 21:51 | history | tweeted | twitter.com/StackSoftEng/status/800819020199063554 | ||
| Nov 21, 2016 at 21:18 | answer | added | Jon Raynor | timeline score: 1 | |
| Nov 21, 2016 at 20:13 | answer | added | Doc Brown | timeline score: 5 | |
| Nov 21, 2016 at 16:27 | comment | added | Jacob is on Codidact | @Akiva Retrieving and replacing elements in a list should at worst be comparable to splitting a big string. | |
| Nov 21, 2016 at 14:49 | vote | accept | Anon | ||
| Nov 21, 2016 at 13:54 | comment | added | Anon |
@JacobRaihle I am not sure to the exact extent, but considering the fact that when manipulating strings via an immutable stringlist, your syntax is going to basically look like this: QStringList sl = s.split("foo"); for (int i=0; i <sl.length(); i++) { QString t = sl.at(i); t.replace("boat", "programming"); s.replace(sl.at(i), t);} I would be hard pressed to believe that this does not add computing time, compared to: s.replace("boat", "programming");
|
|
| Nov 21, 2016 at 13:14 | comment | added | Jacob is on Codidact | @Akiva are you sure about the performance hit? You're working with the same amount of data in any case, I doubt there would be a significant difference. Compose the thousands of functions into one function, invoke that in a loop, and take some measurements. | |
| Nov 21, 2016 at 13:08 | comment | added | Anon |
@JacobRaihle The reason is that a lot of the manipulation I do requires the full string. Applying the manipulation (We are talking about thousands of functions) on a stringlist would vastly complicate the code and hurt performance, because everything would have to be done in a for loop.
|
|
| Nov 21, 2016 at 13:05 | comment | added | jk. | the actual symbols used are largely irrelevant, what is going to make a difference is the grammar of the the thing you are trying to parse | |
| Nov 21, 2016 at 12:39 | comment | added | Tulains Córdova | I don't think user a marker that doesn't translate well into your current encoding is a good idea. | |
| Nov 21, 2016 at 12:38 | answer | added | Erdrik Ironrose | timeline score: 8 | |
| Nov 21, 2016 at 12:37 | comment | added | Jacob is on Codidact | If your program knows where to place these markers, why not generate the sections as separate strings to begin with? | |
| Nov 21, 2016 at 12:32 | answer | added | David Hammen | timeline score: 17 | |
| Nov 21, 2016 at 12:26 | history | edited | Anon | CC BY-SA 3.0 |
deleted 25 characters in body
|
| Nov 21, 2016 at 12:20 | history | asked | Anon | CC BY-SA 3.0 |