White house urges developers to avoid c & c++?

Strangely enough, this sounds fun to me… but maybe that’s because I’ve actually just left the dentist? :crazy_face:

2 Likes

Very much appreciate this summary, thanks.

hjh

1 Like

I’m sure about those features, what got me is that one of the main features is templates, which are macros, or code completion, something that the LISP MIT crew was obsessed with in the 80s.

Templates, meta-programming, and quasi-quotations are also growing strong in other languages today.

1 Like

I agree! I feel a bit guilty and apologise for opening this thread, I did not expect so many replies.

I also found one thing that I thought was wrong.

I thought that changing the programming language to make SC4 would affect the functionality and some of the concepts of SC4 in terms of the most cutting-edge functionality of modern programming languages. However, I got the impression that the functionality and concepts of SC4 might not be so much affected by the language that builds SC4.

Changing the programming environment from C++ to something else takes a lot of time and energy. If there is no difference in the user experience for SC users, and SC is not the software the White House says it is, I see no advantage in changing the platform for building SC4.

Creating a concrete concept and design for SC4 seems more important at the moment than the choice of language for building SC4.

1 Like

It’s a do-ocracy. Whoever codes the stuff, chooses the language.

Your thread was quite fun, don’t be sorry!

We must check now what’s the recommended language by the Kremlin, to have a balanced perspective.

4 Likes

If anyone would like a deeper understanding of how scsynth/supernova and UGens work under the hood, I highly recommend the “Writing Unit Generator Plug-ins” and “Inside scsynth” chapters of The Supercollider Book

I don’t know if there’s a better explanation anywhere, both at a high level and in terms of fairly low-level design decisions for performance.

1 Like

When I look on Linux, lot’s of plugins seems to be written in C. I guess you’re looking at the world from a C++ perspective. In Zig you’ll miss features, but that’s the whole idea of Zig, it doesn’t want to become C++.

1 Like

That might be the case for Linux-only plugins, which are rather niche. Most plugin authors use some kind of cross-platform plugin framework; the most popular one is JUCE – which, of course, is written in C++. In general, C++ absolutely dominates audio plugin development.

Just to avoid some confusion: the various plugin SDKs (VST2, AudioUnits, LV2, CLAP, etc. *) actually provide C APIs, but that’s because C++ does not have a stable ABI, so plugin and host need to talk through the C ABI.

*) The VST3 SDK is a bit of an outlier because up until recently it has only offered a C++ API (based on COM technology); now it also includes a C wrapper (GitHub - steinbergmedia/vst3_c_api: The C API header of the VST3 API).

2 Likes

Yes, that was indeed a minsunderstanding. The implementation language is – or should be – completely independent from the language itself. In fact, some scripting languages have several parallel implementations in different languages. For sclang users it does not matter if it is implemented in C, C++, Rust, Zig, etc., assuming that all the implementations are correct :slight_smile:

1 Like

I happen to be the co-author of the “Writing Unit Generator Plug-ins” chapter for the upcoming 2nd edition :slight_smile: That one is more about writing plugins, as the name suggests. “Inside scsynth”, on the other hand, is really about the implementation of scsynth. It is very well written and highly recommended to anyone who is interested in this topic!

Unfortunately, there is no equivalent chapter for supernova. Many concepts are similar, but there are some significant differences. You can read Tim’s masters thesis (https://tim.klingt.org/publications/tim_blechmann_supernova.pdf) if you want to understand the underlying ideas.

4 Likes

C is the official language of the GNU system, and scheme is its official extension language.

(probably not the real reason for the plugins)

1 Like

Does this matter in practice? I mean, even GCC is mostly written in C++.

1 Like

Wow! When will it be published? I saw that the second edition of The Computer Music Tuorial was recently published even as a kind of ebook in parallel with a paper publication. Is an e-book planned for this?

Well, rarely, unless you’re developing emacs. That’s why emacs uses gtk (C), and would never pick qt (C++). LilluPond follows all this btw, even the extension language.

1 Like

I don’t know yet, but the editing is done, so it’s around the corner. I’m sure there will be an announcement on the forum!

Is an e-book planned for this?

Good question! I have no idea. @muellmusik might know.

2 Likes

I second that, with updated chapters. It would be very welcomed by the community.

2 Likes

Hope to have a date soon.

2 Likes

This is ridiculous, it seems almost that the white house has advisors who can’t cope without garbage collection lmao
Maybe people should just spend more time educating themselves on how to manage memory instead of killing high performance demands. Audio is time critical and any low level implementation will always need to manage memory and buffers (even more so for embedded applications, which makes their point totally ridiculous), and even lock-free inter thread data sharing is a thing, used to make audio as efficient as we have it today and without it we would be still in 1999 with buffer sizes on the order of thousands.

1 Like

On C++ metaprogramming and haskell, see this: What Does Haskell Have to Do with C++? |   Bartosz Milewski's Programming Cafe

This is ridiculous, it seems almost that the white house has advisors who can’t cope without garbage collection lmao

To be fair, they include Rust and Ada, neither of which require garbage collection. Swift is a gray area as it uses reference counting – which is GC in the broad sense – but no tracing GC that would cause pauses.

Again, that recommendation comes from cybersecurity people and I think they are mostly talking about applications that are exposed to the internet or are otherwise safety critical. They certainly didn’t have realtime audio applications in their mind :slight_smile: