Re: Why Throwable.message is not a property

2021-03-17 Thread uranuz via Digitalmars-d-learn
On Wednesday, 17 March 2021 at 19:38:48 UTC, Adam D. Ruppe wrote: On Wednesday, 17 March 2021 at 19:32:02 UTC, uranuz wrote: Seems that a problem with concatenation is because Throwable.message has const(char)[] type, but not string. This makes some inconvenience ;-) Yes, that's what I though

Re: Why Throwable.message is not a property

2021-03-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 17 March 2021 at 19:32:02 UTC, uranuz wrote: Seems that a problem with concatenation is because Throwable.message has const(char)[] type, but not string. This makes some inconvenience ;-) Yes, that's what I thought. The concat operation tends to give the most flexible type of th

Re: Why Throwable.message is not a property

2021-03-17 Thread uranuz via Digitalmars-d-learn
On Wednesday, 17 March 2021 at 17:52:20 UTC, Adam D. Ruppe wrote: On Wednesday, 17 March 2021 at 17:46:27 UTC, uranuz wrote: Also because it is not a property in some contexts when I try to concatenate it with string without parentheses using "~" operator it fails Can you post some sample cod

Re: Why Throwable.message is not a property

2021-03-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 17 March 2021 at 17:46:27 UTC, uranuz wrote: Also because it is not a property in some contexts when I try to concatenate it with string without parentheses using "~" operator it fails Can you post some sample code that demonstrates this?

Why Throwable.message is not a property

2021-03-17 Thread uranuz via Digitalmars-d-learn
The question is why Throwable.message is not a @property?! It looks strange now, because "message" is not a *verb*, but a *noun*. So it's expected to be a property. Also because it is not a property in some contexts when I try to concatenate it with string without pa