Introducing mach.d, the github repo where I put whatever modules I happen to write

poliklosio via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu May 26 01:39:11 PDT 2016


On Wednesday, 25 May 2016 at 22:48:53 UTC, pineapple wrote:
> On Wednesday, 25 May 2016 at 22:29:38 UTC, pineapple wrote:
>> I will do that
>
> ...I'm honestly having second thoughts because reading the 
> style guide for phobos was like a watching a B horror movie.
>
> All the code in the mach.d repo is very permissively licensed 
> and anyone with the patience to write code that looks like this 
> is absolutely free to morph my pretty code into ugly phobos 
> code if they like, provided the license is adhered to (which 
> can be pretty effectively summed up as "please just give credit 
> where it's due")

If you are up to maintaining your lib for your own purposes AND 
phobos module, you can run your code through dfmt to adjust to 
the phobos style guide.

On the other hand, from what I observed about programming 
language communities, adding a standard library module seems like 
a ton of work, including:
- Long philosophical discussions about which specific functions 
should or shouldn't be in the standard library, even when their 
usefulness for module users is obvious.
- Long discussions about merging with or reusing other existing 
modules, which result in your solution not being clean anymore, 
which in turn triggers more discussions about what should be 
excluded from the module.
- Adding unittests and type restrictions, static ifs and 
optimizations for every conceivable use case.

I would't bother adding something to standard library unless I 
was an expert in the field who was likely to get things right the 
first time. I would definitely not bother if a module is just 
means to achieve another goal.

It might be better to observe how your code evolves over time and 
then select one or two specific pieces which are definitely 
useful, clean and correct.


More information about the Digitalmars-d-announce mailing list