SCLang Architecture / random questions

The mainstream language that SC has the most in common with (probably more than even any of the Smalltalk variants) is Ruby. I think Ruby was being developed around the same time, and I recall James McCartney saying that he was explicitly borrowing things from it. Ruby has it’s own problems of course - and after doing a lot of work recently with Python 3.9/3.10 where the type checking system is incredibly rich and easy to use, I feel like Ruby may have lost a lot of it’s edge as a “dynamic” language. But nonetheless, Ruby is still a top-tier modern language, and if you were to pitch SC as “Ruby with a more fluid and flexible syntax” (… basically accurate), it would sound a whole lot more suave than “SmallTalk but even more esoteric and only for music”.

There’s a bit of a tripartite axis for programming languages, something like:

  1. Lots of type annotations
  2. Lots of unit tests
  3. Lots of unpredictable results

Languages like C++ and Rust lean heavily on (1) of course. “Classic” scripting languages like JavaScript and Python ditch (1), which leaves you with some mix of (2) and (3) - modern “typed” versions of these languages (Python with type annotations, TypeScript) are re-introducing (1) because (2) is labor-intensive and just not very fun to do, and (3) is obviously not desirable. SuperCollider chose the (2)/(3) option but never really did (2) (because: boring!) and so we’re left with a language with both feet firmly in (3), for better or for worse. Probably 60% of the messages on this forum can somehow be traced back to the choice of (3) over (1) and (2).

This is not to fault JmC or other peoples choices about SuperCollider - from a computer science perspective, (1) was highly inaccessible when SuperCollider was created. Almost NO high level languages had type checking 25+ years ago - if SC3 were a dynamic-ish, expressive high-level language with a type system when it was released, it would have been one of the ONLY things on the block doing this, a generational leap forward. SC is revolutionary in a lot of ways, this just happened to not be one of them.

In fact, the explosion of fluid and user friendly type checking for high-level dynamic languages seems like it has mainly grown out of projects like TypeScript and Python only in the last 5-7 years. If SuperCollider had a bigger community of comp sci masters and PhD students or Google engineers (meaning: people with extra-ordinary amounts of free time and domain knowledge), it would probably also have (1) at this point - but of course there aren’t so many of those people who also have a deep interest in granular synthesis :).

In conclusion: lets work on getting comp sci masters students into experimental music, so we can get type checking in SuperCollider!

3 Likes