September 21, 2015
On 9/20/2015 5:00 PM, Temtaime wrote:
> I also hate errors when a lambda contains some errors.
>
> [ 1 ].countUntil!(a => a == undeclared_something);
>
> Error: template std.algorithm.searching.countUntil cannot deduce function from
> argument types !((a) => a == undefined)(int[])

Please post to bugzilla.
September 21, 2015
On 9/20/2015 6:49 PM, bitwise wrote:
> On Sunday, 20 September 2015 at 17:39:46 UTC, Andrei Alexandrescu wrote:
>> Off the top of your head, can you list a few of the worst error messages
>> you've encountered?
>
> Fine in release mode, error in debug mode:
>
> struct S { int value; }
>
> void main(string[] args) {
>      Array!S stuff = [S(3), S(1), S(2)];
>      stuff[].sort!((ref S a, ref S b) => a.value < b.value);
> }
>
> std/range/package.d(7180,24): Error: 'std.range.SortedRange!(RangeT!(Array!(S)),
> __lambda2).SortedRange.dbgVerifySorted' is not nothrow
> std/algorithm/sorting.d(982,29): Error: template instance
> std.range.assumeSorted!(__lambda2, RangeT!(Array!(S))) error instantiating
> main.d(75,9):  instantiated from here: sort!(function (ref S a, ref S b) =>
> a.value < b.value, cast(SwapStrategy)0, RangeT!(Array!(S)))

Please post to bugzilla.

September 21, 2015
On Monday, 21 September 2015 at 02:38:46 UTC, Walter Bright wrote:
> On 9/20/2015 6:49 PM, bitwise wrote:
>> [...]
>
> Please post to bugzilla.

Yeah, sorry. I am kinda lazy with these things.

https://issues.dlang.org/show_bug.cgi?id=15091

    Bit

September 21, 2015
On 21/09/15 1:01 PM, Sean Campbell wrote:
> On Sunday, 20 September 2015 at 17:32:53 UTC, Adam wrote:
>> Visual D, a mighty attempt to bring some sanity to D in windows, is
>> simply to unpolished to work well. It brings the looks of Visual
>> Studio but not the feel of how VS works so well with .NET. I spend
>> over an order of magnitude more time trying to fix D bugs than I do in
>> .NET. Unfortunately this makes it infeasible to continue to use D.
>>
>> For example, I build a ~10k line app in under a week in .NET, with gui
>> and everything. In D I'm still working on getting the libraries build.
>> Even with all the power D has, what good is it if you can't get off
>> the starting line. Some will write this off making some assumption, So
>> be it.
>>
>> .NET is a bliss to work in, D is drudgery. If only MS would build a D
>> compiler similar to what it has done with C#. No offense to all those
>> who have worked hard on D, someone has to do it. For me, .NET is like
>> heaven, D is like hell: It's almost exclusively due to the error
>> messages and IDE.
>
> I know what he means about visual D, it can be quite difficult to work
> with and doesn't seem very polished. That being said xamarin studio with
> the mono-D plugin is just opposite, or at least in my own experience and
> it supports both windows and *NIX.

+1EGOOGOLPLEX aka a very large number that doesn't matter

I do enjoy Mono-D use it to stream and all!
September 21, 2015
On 9/20/2015 8:12 PM, bitwise wrote:
> https://issues.dlang.org/show_bug.cgi?id=15091

Thanks!

September 21, 2015
On Monday, 21 September 2015 at 00:01:01 UTC, Temtaime wrote:
> I also hate errors when a lambda contains some errors.
>
> [ 1 ].countUntil!(a => a == undeclared_something);
>
> Error: template std.algorithm.searching.countUntil cannot deduce function from argument types !((a) => a == undefined)(int[])

I agree, the error should contain better reasoning as to why the function cannot be deduced. Since Phobos uses templates pretty heavily, and sometimes has a decent set of pre-conditions, tracking down which condition exactly is failing is hard. Printing the template condition and the expression in it that caused the instantiation to fail would be tremendously helpful!
September 21, 2015
On Monday, 21 September 2015 at 13:03:20 UTC, default0 wrote:
> On Monday, 21 September 2015 at 00:01:01 UTC, Temtaime wrote:
>> I also hate errors when a lambda contains some errors.
>>
>> [ 1 ].countUntil!(a => a == undeclared_something);
>>
>> Error: template std.algorithm.searching.countUntil cannot deduce function from argument types !((a) => a == undefined)(int[])
>
> I agree, the error should contain better reasoning as to why the function cannot be deduced. Since Phobos uses templates pretty heavily, and sometimes has a decent set of pre-conditions, tracking down which condition exactly is failing is hard. Printing the template condition and the expression in it that caused the instantiation to fail would be tremendously helpful!

The problem is that the compiler doesn't know which version of the template constraints you meant to invoke.

e.g.

void foo(Bar)(Bar b) if (isSomething!Bar) { ... }

and

void foo(Bar)(Bar b) if (isSomethingElse!Bar) { ... }

The best thing the compiler can do is say `Error: Bar != isSomething and Bar != isSomethingElse`. Which is basically what its doing right now.
September 21, 2015
On Sunday, 20 September 2015 at 17:32:53 UTC, Adam wrote:
> My experiences with D recently have not been fun.
>
> The language itself has a top notch feature rich set. The implementation, excluding bugs, feels a bit boxy and old school. .NET has a unified approach and everything seems to fit together nicely and feels consistent. The abomination of dmd, though, is it's error messages. Most of them are meaningless and you have to dive down 2 or 3 levels of assumptions to figure out what they mean. It's not too bad but because of the poor tool set it makes it difficult to debug apps.
>
> Visual D, a mighty attempt to bring some sanity to D in windows, is simply to unpolished to work well. It brings the looks of Visual Studio but not the feel of how VS works so well with .NET. I spend over an order of magnitude more time trying to fix D bugs than I do in .NET. Unfortunately this makes it infeasible to continue to use D.
>
> For example, I build a ~10k line app in under a week in .NET, with gui and everything. In D I'm still working on getting the libraries build. Even with all the power D has, what good is it if you can't get off the starting line. Some will write this off making some assumption, So be it.
>
> .NET is a bliss to work in, D is drudgery. If only MS would build a D compiler similar to what it has done with C#. No offense to all those who have worked hard on D, someone has to do it. For me, .NET is like heaven, D is like hell: It's almost exclusively due to the error messages and IDE. I know many here will write off such complaints, So be it.
>
> My main concern with .NET is portability and performance. I am going to give in to the portability and just assume Mono is good enough. Performance wise, I'd prefer D, but .NET is performant enough for most apps. Maybe in a few years things will change, I can't wait that long. Sorry guys! (not that you will miss me)
>
> Remember, no reason to have the sharpest sword if you can't wield it.

D is community driven. It's what people want it to be.

One thing: don't expect to master it in two weeks, particularly if you want it to be like your motherland language, like your comfort zone. From your conclusion it looks like you want to stay in your comfort zone, that's up to you but don't give up like this.

Give a chance on D on your free time to understand it. Particularly because the standard library let you incredibly free to choose between data oriented, oop, fp programming and in all the cases the algorithms will be compatible...that's really a **major** aspect of D (reflected in the standard lib).
September 21, 2015
On Monday, 21 September 2015 at 14:00:42 UTC, PovGuy wrote:
> On Sunday, 20 September 2015 at 17:32:53 UTC, Adam wrote:
>> [...]
>
> D is community driven. It's what people want it to be.
>
> One thing: don't expect to master it in two weeks, particularly if you want it to be like your motherland language, like your comfort zone. From your conclusion it looks like you want to stay in your comfort zone, that's up to you but don't give up like this.
>
> Give a chance on D on your free time to understand it. Particularly because the standard library let you incredibly free to choose between data oriented, oop, fp programming and in all the cases the algorithms will be compatible...that's really a **major** aspect of D (reflected in the standard lib).

https://www.youtube.com/watch?v=jUQwJmQGWtU
September 21, 2015
On Monday, 21 September 2015 at 02:38:28 UTC, Walter Bright wrote:
> On 9/20/2015 5:00 PM, Temtaime wrote:
>> I also hate errors when a lambda contains some errors.
>>
>> [ 1 ].countUntil!(a => a == undeclared_something);
>>
>> Error: template std.algorithm.searching.countUntil cannot deduce function from
>> argument types !((a) => a == undefined)(int[])
>
> Please post to bugzilla.

https://issues.dlang.org/show_bug.cgi?id=14885
https://issues.dlang.org/show_bug.cgi?id=10679

It is 2015 and we don't have line number in stack traces.