Shortcut for call of a method

Herby Vojčík herby at mailbox.sk
Wed Oct 26 19:39:53 UTC 2016


Hi!

Inspired by what I just did in Amber Smalltalk workspace:

   Smalltalk packages do: #commit

Eg., selector symbol #commit acting as an [ :x | x commit ] block, would 
it be feasible (it only saves 6 chars of nicely formatted "x => x", so 
maybe no) to have a similar shortcut in ES, as in:

   employees.map(.fullName)
   items.forEach(.init())
   products.filter(.includes(searchString))

Including things like `const emitFoo = .emit("foo");`.

Just a thought,

Herby


More information about the es-discuss mailing list