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

[sc-dev] ListPatterns: a modest proposal

x = Pseq(1, inf);

Good way to hang sclang. The reason is that x.list.size is always 0, so the .embedInStream never gets called and the Pseq stream loops infinitely.

Would there be any harm in checking, at instantiation, to make sure the list in a ListPattern is really a SequenceableCollection? sclang shouldn't be that easy to break.

list.isKindOf(SequenceableCollection).not.if({ list = [list] });

This "feature" has tripped me up more than once. It just cost me the better part of an hour. Grr.

H. James

H. James Harkins /// dewdrop_world

"If attacked by a lion, thrust your arm down his throat.
This takes some practice."  -- Cyril Connolly