* in Pbind alternative syntax

One thought about the name: conversion from one type of object to another is often written with an “as” method: asString, asInteger, asArray, asSignal… so asPbind might be better for consistency (and IMO readability). (As a personal extension, of course, you can name it as you like.)

However, comparing concision by removing the contents:

  • Pbind(*[]) = 10 characters
  • [].pbind = 8 characters

… which doesn’t save much typing (where .pseq drops parentheses and , inf so the savings are more substantial). Perhaps in this case, the benefit is more to reduce visual noise (two layers of brackets and the * in the canonical syntax).

hjh

1 Like