2 ms·
In Objective-Smalltalk: task ← NSTask new. task setLaunchPath:'/usr/bin/mdfind'; setArguments:#('kMDItemDisplayName == *.playground'); la
by mpweiher 11y ago
In Objective-Smalltalk:
task ← NSTask new.
task setLaunchPath:'/usr/bin/mdfind';
setArguments:#('kMDItemDisplayName == *.playground');
launch;
waitUntilExit.
Aside from the ';', no special syntax needed. And unlike other Smalltalks, there is a parallel with '|' for composition instead of cascade (so send the next message to the result instead of the receiver of the first expression), which helps disambiguating keyword syntax without requiring parentheses:
'a' stringByAppendingString:'b' | stringByAppendingString:'c'.
This is especially useful when building expression incrementally, as it doesn't require going back to the start of the expression. Of course, stringByAppendingString: isn't such a good example because the ',' message makes this quite a bit more compact:
'a','b','c'