objectory icon indicating copy to clipboard operation
objectory copied to clipboard

Make .match() similar to Dart SDK's RegExp

Open kaisellgren opened this issue 11 years ago • 1 comments

The match() method has the parameter caseInsensitive. Can we make this the same as Dart SDK's RegExp constructor, which has a caseSensitive parameter?

I find myself constantly specifying the wrong named parameter because of this. So, nowadays I'm always trying to remember which way it was and do I need true or false here.

This adds burden to the executive control of my working memory (cognitive load). Therefore this is a UX issue (maybe tag with Enhancement).

Maybe we could even allow the user to specify either of those?

kaisellgren avatar May 07 '13 11:05 kaisellgren

I think maybe change match() API altogether. Make it match(String fieldName, Pattern pattern) So methods would accept or String pattern (with default values for multiline and caseSensitive) or RegExp with these params set.

vadimtsushko avatar Jun 01 '13 11:06 vadimtsushko