Greg> re in string >> Greg> should be made to work too, where re is a regular Greg> expression object? >> >> Then the core language would have to know about regular >> expressions, right? Guido> Um, yes. That kills the idea (unless you want to write this as Guido> "string in re", which almost makes sense :-). Or unless the notion of ``x in y'' could be were reinterpreted in terms of a new attribute that strings, chars, and regexps would share. That is, I can imagine defining ``x in y'' anologously to ``x+y'' as follows: If x has an attribute __in__, then ``x in y'' means ``x.__in__(y)'' Otherwise, if y has an attribute __rin__, then ``x in y'' means ``y.__rin__(x)'' and so on. This is an example of the kind of situation where I imagine type categories would be useful.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4