Syntax sugar for {} with structs
ryuukk_
ryuukk.dev at gmail.com
Wed Jul 6 17:22:27 UTC 2022
On Wednesday, 6 July 2022 at 16:23:58 UTC, H. S. Teoh wrote:
> On Wed, Jul 06, 2022 at 03:51:56PM +0000, ryuukk_ via
> Digitalmars-d wrote: [...]
>> D likes to steal common words that i can't use in my APIs
>>
>> `debug`, `version`, `init`, `destroy`
>>
>> It forces me to come up with annoying alternatives
>>
>> `dbg`, `versionn`, `create`, `dispose` (but i really need
>> `destroy`)
>>
>> This is poor design in my opinion
>
> https://dlang.org/dstyle.html
>
> Quote from section "Keywords":
>
> If a name would conflict with a keyword, and it is desirable to
> use the keyword rather than pick a different name, a single
> underscore ‘_’ should be appended to it.
>
> This is just a recommendation, of course. But at least you
> wouldn't have to invent new words for your identifiers.
>
>
> T
That's not something i like, more care should have been put when
deciding to name and put a function in the global scope, i
shouldn't have to pay for that
More information about the Digitalmars-d
mailing list