ClojureScript

Details

Type:
Enhancement

Status:
Closed

Priority:
Minor

Resolution:
Declined

Affects Version/s:
None

Fix Version/s:
None

Component/s:
None

Labels:

None

Description

Currently we extend to nil to a bunch of protocols, while this was convenient for the initial implementation this has many unfortunate performance consequences. We should probably not extend nil to anything and deal with the nil value directly as is done in Clojure on the JVM. In addition we can add a special ^not-native type-hint. In critical paths this would allow us to inline calls directly to protocol implementations.

Perhaps this could also allow us to hint with ^native to inline calls to the native tables.