Suggestion: expose delimiters

A small patch / proposal: For my Japanese library, I wanted to add the delimiter “と” as a conjunctive for objects. This would currently require editing the standard library, which I might eventually do but would like to see if I can avoid. So, I’d like to suggest the addition of predicates that a library writer can supersede to change the delimiters for actions and objects/directions. One possible implementation is below in diff format:

> %% Delimiters
> (action delimiters [. ; then])
> (object delimiters [, and])
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
< 	*(split $Words by [, and] into $Left and $Right)
> 	(object delimiters $delimiters)
> 	*(split $Words by $delimiters into $Left and $Right)
< 	(if) (split $Words by [. ; then] into $Left and $Right) (then)
> 	(action delimiters $delimiters)
> 	(if) (split $Words by $delimiters into $Left and $Right) (then)
< 				*(split $ActualWords by [, and]
> 				(object delimiters $delimiters)
> 				*(split $ActualWords by $delimiters

Thanks for considering!

1 Like