May 09, 2013
On Thursday, 9 May 2013 at 18:10:47 UTC, Walter Bright wrote:
> On 5/9/2013 1:48 AM, Russel Winder wrote:
>> The positive lesson from Go is that application of one, and only one,
>> formatting style, backed up by a tool incorporated into the compiler,
>> does lead to the avoidance of bikeshedding and to community peace — just
>> not world peace.
>
> I'd support the development of a dfmt, and using it to automatically reject pull requests for phobos that don't pass it.

I think even neater would be a tool that sends a pull request to the source repo/branch with the format changes so the author can just apply them with a click.
May 09, 2013
On 5/8/2013 7:56 AM, Benjamin Thaut wrote:
> So what I'm trying to say is, that maybe a pull request should first be analyzed
> if it is actually worth putting more work into it before starting with the
> nitpicks. I don't know if the review process is already defined somewhere, if
> not it might be worth doing so.


For me, the fundamental issue with it was the design - use tagged variants or virtual functions? I agree with you that without a decision on that, proceeding with an implementation is not worth the effort.

BTW, one issue is nearing resolution. D will soon provide a dll for phobos for Linux, and it is intended to migrate this to all platforms, which will resolve the ODR problem.
May 09, 2013
On 5/9/2013 11:15 AM, Brad Anderson wrote:
> On Thursday, 9 May 2013 at 18:10:47 UTC, Walter Bright wrote:
>> On 5/9/2013 1:48 AM, Russel Winder wrote:
>>> The positive lesson from Go is that application of one, and only one,
>>> formatting style, backed up by a tool incorporated into the compiler,
>>> does lead to the avoidance of bikeshedding and to community peace — just
>>> not world peace.
>>
>> I'd support the development of a dfmt, and using it to automatically reject
>> pull requests for phobos that don't pass it.
>
> I think even neater would be a tool that sends a pull request to the source
> repo/branch with the format changes so the author can just apply them with a click.

It could also start off as something as simple as:

1. no tabs
2. LF line endings (no CRLF)
3. no trailing whitespace
May 09, 2013
On 09.05.2013 20:15, Walter Bright wrote:
>
> BTW, one issue is nearing resolution. D will soon provide a dll for
> phobos for Linux, and it is intended to migrate this to all platforms,
> which will resolve the ODR problem.

A shared phobos library will not solve the ODR problem, because TypeInfo for instances of class or struct templates will still be generated into every binary that instantiates them if they do not happen to be instantiated by phobos itself.

I'm undecided whether these could be treated as different classes/structs even if they have the same name. Also considering possible different memory layout due to different compile options: welcome to DLL hell.
May 10, 2013
Am 09.05.2013 20:15, schrieb Walter Bright:
> On 5/8/2013 7:56 AM, Benjamin Thaut wrote:
>> So what I'm trying to say is, that maybe a pull request should first
>> be analyzed
>> if it is actually worth putting more work into it before starting with
>> the
>> nitpicks. I don't know if the review process is already defined
>> somewhere, if
>> not it might be worth doing so.
>
>
> For me, the fundamental issue with it was the design - use tagged
> variants or virtual functions? I agree with you that without a decision
> on that, proceeding with an implementation is not worth the effort.
>
> BTW, one issue is nearing resolution. D will soon provide a dll for
> phobos for Linux, and it is intended to migrate this to all platforms,
> which will resolve the ODR problem.

Well that is nice for you, but for my use cases this will most likely not work, and thus I'm just going to continue maintaining my own version of druntime. For example I'm reloading classes at runtime which happens via a dll. As a result the TypeInfo of that class will exist twice (if you reload once) because the dll with the new class binary will contain the new TypeInfo object and thus violating the ODR. For a in depth explanation see: http://3d.benjamin-thaut.de/?p=25

Kind Regards
Benjamin Thaut
May 10, 2013
On 2013-05-09 19:02, Sean Kelly wrote:

> Here's a breakdown of some of the more popular formatting styles:
> http://en.wikipedia.org/wiki/Indent_style.  I think D tends towards
> Allman style (which I think the astyle formatter calls BSD style).  My
> code is formatted a bit differently in terms of spacing around parens
> but I'd be happy to have it changed--I use Allman style these days too.

DMD uses the weird Horstmann style in some places. Which in my opinion is horrible.

-- 
/Jacob Carlborg
May 10, 2013
"Jacob Carlborg" <doob@me.com> wrote in message news:kmii5f$1nut$1@digitalmars.com...
>
> DMD uses the weird Horstmann style in some places. Which in my opinion is horrible.
>

This is the old code and is discouraged in new code.


1 2 3
Next ›   Last »