Life of Tau
353 subscribers
4.69K photos
302 videos
37 files
1.28K links
See also @magistau@mas.to
Правила чата/комментариев: https://xn--r1a.website/tauslife/9
Download Telegram
Forwarded from Блог*
#prog #c #cpp #article

Статья (копия на веб-архиве) о различиях между C и C++, которые не дают права утверждать, что C++ является надмножеством C.
Forwarded from Блог*
#prog #cpp #abnormalprogramming

twitter.com/sehetw/status/1465726704979267586

Вообще это было переслано в <twitter:Affective C++>, но прикольно, что на C++ можно до некоторой степени сымитировать именованные прерывания цикла
Forwarded from Блог*
#prog #rust #cpp #article

Can you have too many programming language features?

Bjarne Stroustrup famously said, “Within C++, there is a much smaller and cleaner language struggling to get out.” I think he regrets the quote, which he clarified is about the modern semantics of C++, held down by the outdated syntax of C. It’s such a compelling quote, though, because C++ is so messy and dirty, so we want to believe in a small clean underlying core.

The truth, however, is that there isn’t one smaller and cleaner programming language struggling to get out. There’s multiple. And from the beginning, C++ was a glomming-together of multiple ideas: a Simula-like OOP system glued awkwardly to C, without a unified motivating vision. Operator overloading was intended to help integrate the two parts, which it did but at the expense of creating its own entire sub-paradigm. And then came templates, which tried to add generic containers and algorithms but unexpectedly exploded into their own programming paradigm.

So inside C++, struggling to get out, is of course C, the original “portable assembly,” which does its very simple job well. There’s also Java/C# in there, if we take the OOP features on their own. For the operator overloading and RAII and templates, the closest I can really imagine is Rust, which I think if Bjarne was being fair, he would have to admit is close to what he specified when he clarified his quote: Rust does emphasize “programming styles, libraries and programming environments that emphasized the cleaner and more effective practices over archaic uses focused on the low-level aspects of C.”
❤4