When approaching a regular expression, treat it as its own programming problem, even though only one or two lines of code may be involved; those lines effectively form a small program.
当处理规则表达式时,将它作为它自己的编程问题来处理,即使只涉及一或两行代码;这些行有效地构成了一个小程序。
If you've spent a significant amount of time working with object-oriented languages, you've probably run into examples of the Expression Problem.
如果您已经花费了大量的时间使用面向对象的语言,则您可能已经遇到了表达式问题的例子。
Coined by Philip Wadler, the expression problem defines a program's data as a set of cases (types) and a set of operations over those cases.
表达式问题这个词是由Philip Wadler定义的,它将一个程序的数据定义为一组用例(类型)和对于这些用例的一组操作。
应用推荐