libasync icon indicating copy to clipboard operation
libasync copied to clipboard

Consider using the D/Phobos style conventions

Open GeorgeSapkin opened this issue 10 years ago • 4 comments

Is there any reason why you are not using the D style conventions? Spaces instead of tabs and braces on own lines in particular.

GeorgeSapkin avatar Feb 23 '15 11:02 GeorgeSapkin

I don't yet have .editorconfig in Mono-D and the default is tabs as tabs, so I just kept going with that. I guess I'll have to change that soon enough

etcimon avatar Feb 23 '15 12:02 etcimon

braces on own lines

Depends on the length of the line, I don't particularly crave line counts over readability. I like to put them on their own line for methods or object but it varies for code blocks.

etcimon avatar Feb 23 '15 12:02 etcimon

I know this might not be that pleasant, but if you want libasync to be included in Phobos (and I hope you do propose that soon), it has to use the Phobos style. There is also dfmt

wilzbach avatar May 29 '16 14:05 wilzbach

I'll probably do that soon enough, I'm freeing myself up slowly for it. I think expanding the standard library with event-based (thread-local) concurrency would benefit the whole D community. I would prefer seeing this added to druntime in core.event so that you can have fiber-blocking synchronization primitives in core.sync and a fiber scheduler in core.thread, but it's still developing slowly in my mind

etcimon avatar May 29 '16 15:05 etcimon