You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
specialized string-like types with associated metatable methods #70
In the vein of Pythons regex strings (r "this is a regex"), it would be super-useful to add suitable metatables (and hence appropriate methods) to certain types of strings, as well as being able to recognize them with argcheck to help reduce coding errors.
For example, a file path could be declared as Path "~/.zemacs/init.zl", and automatically expand tilde expressions, and have methods for splitting, inserting etc by component much like the existing package.find and friends.
Better would be to do that with Filename instead, and use Path for objects with metamethods that lend themselves to absorbing (and generalizing) the functions currently in std.package.
Activity
gvvaughan commentedon Aug 15, 2014
Scratch the Path syntax proposal above...
Better would be to do that with
Filenameinstead, and usePathfor objects with metamethods that lend themselves to absorbing (and generalizing) the functions currently instd.package.