Подтвердите e-mail

Для публикаций, комментариев, реакций и сообщений подтвердите адрес.

Публикация

Предыдущая публикация

This looks complex because it is doing a lot of things in a small space. My phone also does a lot of things in a small space. Doesn't mean it's bs just because I haven't taken the time to read it 🤷🏼‍♀️

100

P.S. this is sample code. If this isn't the use case for you and you don't need it - see above: Do not do surgery on yourself using a mirror just because you [think you] can and happen to have a knife and a mirror handy, you f**king plonker.

Обсуждение

1 прямых ответов · 3 сообщений

It should be obvious this isn't a real use case, given this uses structs - which are the precursors to classes; and tend to only be used in C because it does not have classes. Please, please, please, do not use structs unless you have to. I know they look easy, but everyone will hate you.

Ответ для naffdoodaa

P.P.S. We're tinkering with the compiler here. The entire point of the compiler is to do the complicated stuff so you don't have to. Don't be shocked that it has "here be dragons" written all over the place, along with warnings that this is a terrible idea unless you know what you're doing.

Ответ для naffdoodaa

Tl;dr it is bonkers code because it's a bonkers use case. Don't ever do this just because you can.