[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] top five sclang pet peeves





On Mon, Dec 25, 2017 at 11:59 AM, <stefaan.himpe@xxxxxxxxx> wrote:
Sclang has a lot of incredibly good stuff to offer but sometimes it makes me
curse. Without wanting to sound too negative, here are my top 5 pet peeves
with sclang in supercollider.

This is good to know, thanks!

Feel free to add your own, or bash mine (or ignore the post altogether) :)

1. Order of mathematics operations. I understand it's an OO thing, but I
have shot myself in the foot too many times with this already. For a
language that is somewhat math-centric to adopt "alternative conventions" is
rather evil. [Read: apparently it's hard to unlearn old habits].

I would say more Smalltalk language design more than OO. I agree with this. It is not ideal. It could be changed by adding the concept of operation ordering to the compiler, although without a strong type system it would mean that * and / are evaluated before + and - on ALL objects, not just numerics. Also would break a lot of code, although it wouldn't be too difficult to provide a script that translates.

2. Having to declare all variables at the beginning of a function. It works
miracles for unreadability and breaking the flow.

Agree, I have wanted to work on this when I get some time to become more familiar with the SC compiler.

3. The lack of an Sclang debugger - breakpoints, watch, ... those kinds of
things. Debugging code based on postln is entirely possible, but can be
frustrating, especially in combination with point 2.

Yep. IIRC Scott Carver has done some work on this.

4. Calling add on an array returns a new array instead of adding to the
existing one. I understand it has its advantages for chaining operations
etc. This, admittedly, is mostly a matter of me having to get used to the
conventions again.

I think there is a good reason for this that I can't remember right now. In absence of that reason I can't say I agree or disagree, except that it has also confused me a lot.
 
5. No number five! I told you I'd keep it positive :D

<3

-Brian