-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.core-llibrary-coretype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
Too often in code reviews (just saw @lrhn's code review) we are instructing developers to avoid creating new RegExp('...') as a class-level or local field (I've even seen it in tight-loops!). Can the RegExp class support a const constructor that is canonicalized?
assert(identical(const RegExp('a-z'), const RegExp('a-z'));(Even if the implementation for the VM is not-so, we'd like this in dart2js badly)
/cc @rakudrama
bergwerf, thosakwe, hexrcs, michaelspiss, bjconlan and 16 morebergwerf, renancaraujo, roadroot and albertms10
Metadata
Metadata
Assignees
Labels
area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.core-llibrary-coretype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug