Yesterday I raised a point about S32::Temporal about how DateTime should do subtraction between two DateTime objects, and then I raised the point of subtracting/adding only, say, 5 hours, instead of a whole other DateTime object. At that point masak raised a concern that it may not be very coreish, or rather, when is it beyond the scope of the core? That discussion starts here (and here is the point relevant to this post).
This sort of issue happened a few days earlier, over some code that used Math::Prime. It’s something I believe has happened more than a few times before, and something that will happen more than a few times more. I have thought of a possible solution: Core++.
What is it? Simple: It’s a place for things that don’t quite fit with core but seem too simple/common/* for life as a module. To help illustrate, let me whip up a likely extremely poor analogy between this idea and Linux. You have a kernel, which contains the bits a kernel needs to have in order to be called a decent kernel (the P6 Core). You also have kernel modules, which can be loaded on and off at will, and are distributed with the kernel, more often than not (Core++). Finally, you have every executable on your computer, which lets you perform certain tasks easier (modules). Told you it’d be a poor analogy🙂 .
Point is, here’s the idea of Core++: a collection of semi-common functions, maybe loaded at will. As far as I can tell, parts of S32 (e.g. Temporal) already behave in this manner.
I think my idea needs more development, such as syntax, how it’s regulated (if at all), etc. But I think such a thing needs to exist, and I just wanted to put the idea forward.
[Who knows why I keep making “thinking” posts, where I describe what I think? Maybe I just love thinking :)]