Syntax sugar for {} with structs

ryuukk_ ryuukk.dev at gmail.com
Fri Jul 1 18:21:01 UTC 2022


On Friday, 1 July 2022 at 18:02:59 UTC, Paul Backus wrote:
> On Friday, 1 July 2022 at 17:33:55 UTC, ryuukk_ wrote:
>> We have to stop with utility function to solve annoyances like 
>> this
>>
>> I'd use an other language if i have to keep writing utility 
>> functions and templates all over the place and keep importing 
>> ton of modules because the language refuses to evolve paste 
>> the 80's
>
> What's the problem with utility functions? You would prefer it 
> if any time something annoys someone, we add an entire new 
> language feature for it? Surely you can understand why that 
> approach to language development is not sustainable.
>
> If your objection is "I shouldn't have to write this myself; it 
> should be available out of the box," then I encourage you to 
> make a PR submitting it to the standard library. If it's useful 
> to you, there's a good chance it will be useful to others too.

I'm not a language developer, i write games, so the only thing i 
can do is write games and suggest language improvements

Of course i can write the template, of course i could write a 
function in the struct

If i came to write the thread is to talk about the feature idea, 
not what function i can write

Suggesting me to write a function is implying i didn't think 
about it beforehand, wich is a little bit rude, i got the same 
kind of answers about the .Enum, wich is unfortunate that people 
can't focus on talking about the feature instead of telling 
people to do what they were already doing and to not bother trying

I'd have got the information why the feature wasn't already in 
place, why it is not possible, or what it would take to have the 
feature, pros/cons and that kind of things

If for every feature suggestion i post here, i am telling to 
write a function or template instead, then where can i talk about 
language features propositions?


More information about the Digitalmars-d mailing list