With powered hubs and balanced tree topology, you can split a single root controller into 45 endpoints. Your motherboard being able to support that many devices and the shared bandwidth might be a problem, but it’s theoretically possible to survive off of a single USB port.
To offer a differing opinion, why is null helpful at all?
If you have data that may be empty, it’s better to explicitly represent that possibility with an
Optional<T>
generic type. This makes the API more clear, and if implicit null isn’t allowed by the language, prevents someone from passing null where a value is expected.Or if it’s uninitialized, the data can be stored as
Partial<T>
, where all the fields areOptional<U>
. If the type system was nominal, it would ensure that the uninitialized or partially-initialized type can’t be accidentally used whereT
is expected sincePartial<T>
!=T
. When the object is finally ready, have a function to convert it fromPartial<T>
intoT
.