Felix Palmen 📯 · @zirias
36 followers · 153 posts · Server techhub.social

@jhx You asked for it, so I'll answer it:

Imho, C++ design is broken from the very beginning. It wanted to provide language constructs, still maintaining full compatibility (which already failed many years ago, cause the languages took different roads).

It combines (IMHO generally a bad idea) with explicit resource management (an *awful* idea, forcing you to use which will in turn mandate creation of purely "technical" classes, just to manage resources).

It wanted , but that's impossible without breaking C compatibility, so it came up with , actually a on steroids.

Overloading also doesn't fit into the simple C library ABI (where symbols are named just like the function), so it came up with "name mangling" ... which is especially horrific because it is *not* standardized.

Ah well, I could go on 😂

#oop #c #exceptions #raii #generics #Templates #preprocessor #linker

Last updated 2 years ago

Zachary Perkins · @zperk13
4 followers · 360 posts · Server mastodon.sdf.org

#raii #gc

Last updated 2 years ago

As much as we love , we've always felt the lack of a convenient feature in the language. Yet, many compilers allow to implement such feature with relatively little effort.

So, @micia thought to share such implementation, and our point of view on the subject, in a article.

We’ll be glad to hear your feedback and suggestions before we publish it on our website.

codeberg.org/1414codeforge/art

#c #raii #cprogramming #programming #software

Last updated 2 years ago

As much as we love , we've always felt the lack of a convenient feature in the language. Yet, many compilers allow to implement such feature with relatively little effort.

So, @micia thought to share such implementation, and our point of view on the subject, in a article.

we’ll be glad to hear your feedback and suggestions before we publish it on our website.

codeberg.org/1414codeforge/art

#c #raii #cprogramming #programming #software

Last updated 2 years ago

1414 Code Forge :it: · @1414codeforge
181 followers · 983 posts · Server mastodon.uno

Il ci piace, ma sentiamo spesso la mancanza di un meccanismo di nel linguaggio. Per fortuna, molti compilatori consentono di implementarne uno con relativamente poco sforzo.

Perciò il buon @micia ha pensato di buttare giù un articolo per mostrare come farlo e spiegare il nostro punto di vista.

Qualcuno abbastanza volenteroso da condividere commenti e dirci se abbiamo sbagliato nulla, prima di pubblicarlo sul nostro sito?

codeberg.org/1414codeforge/art

#c #raii #cprogramming #programming

Last updated 2 years ago

OT Chen :mangeice: · @ot32em
36 followers · 479 posts · Server g0v.social

選前賜票 叭叭叭
選後謝票 叭叭叭

配置釋放都有成對
資源不會leak 👍

#吵死 #raii

Last updated 3 years ago

· @epg
4 followers · 3 posts · Server mastodon.sdf.org
David Sugar · @tychosoft
244 followers · 3147 posts · Server fosstodon.org

I actually don't hate more the more I use it, which is rather refreshing given how I did come to really hate and what has done with that. I do strongly disagree with some specific choices made in rust, though others do make clear sense, and cargo makes project life so simple. I do love how locking can be inserted in front of container access; this feels cleaner than c++ guards, and once again demonstrates why is so essential, not an anti-pattern.

#google #rust #golang #raii

Last updated 4 years ago

· @FSMaxB
25 followers · 295 posts · Server mastodon.cloud

I just noticed that having access to a memory region (mprotect) can be interpreted as having a resource.

Following the principle, that resource can be encapsulated in an object that automatically unlocks the memory when constructed and locks it again when destructed.

#raii #cpp

Last updated 9 years ago