3 ms·
Smalltalk, Objective-C and Swift (from the languages I know) have a syntax similar to that. Only it doesn't need parenthesis, so it's more like: [hit: ball wit
by coldtea 11y ago
Smalltalk, Objective-C and Swift (from the languages I know) have a syntax similar to that. Only it doesn't need parenthesis, so it's more like:
[hit: ball with: bat]
The method is called 'hit:with:'.
Thought they don't go overboard with the "like english" thing, they mostly use the extra keys for disambiguating arguments. E.g.:
[fileWrapper writeToFile: path atomically: YES updateFilenames: YES];
- vram22 11y agoDidn't know that. Cool, thanks for mentioning.