December 08, 2013
On Sunday, 8 December 2013 at 06:58:59 UTC, Marco Leise wrote:
> But the verbose D syntax is just too distracting:
>   bool function(T a, T b) { return a > b; })

I think you mean "the verbose D syntax:"
    (a, b) { return a > b; }
December 08, 2013
Am Sun, 08 Dec 2013 18:15:40 +0100
schrieb "Jesse Phillips" <Jesse.K.Phillips+D@gmail.com>:

> On Sunday, 8 December 2013 at 06:58:59 UTC, Marco Leise wrote:
> > But the verbose D syntax is just too distracting:
> >   bool function(T a, T b) { return a > b; })
> 
> I think you mean "the verbose D syntax:"
>      (a, b) { return a > b; }

:(

-- 
Marco

December 09, 2013
On Saturday, 7 December 2013 at 20:23:29 UTC, Timon Gehr wrote:
> On 12/07/2013 07:13 PM, bearophile wrote:
>>
>> Currently in D you can write:
>>
>> enum move = (in int dx, in int dy) pure nothrow => Point(X + dx, Y + dy);


I didn't know you could do that, neat.

It also means you can do it for implicit template, I suppose. You can't do it for declaring a function, but I suppose it works for declaring a lambda, and storing it in a enum:

enum moveRight(int DX) = (in int dx) pure nothrow => dx + DX;

> IIRC Don said this shouldn't work since the context is not actually known at compile time.

I only see this being a problem if the lambda actually needs access to the context.
December 09, 2013
On Sunday, 8 December 2013 at 11:23:48 UTC, bearophile wrote:
> The relative Reddit thread explains another small feature of the next C#:
>
> http://www.reddit.com/r/programming/comments/1sbkxl/a_quick_highlight_of_upcoming_c_language_changes/cdwedrh
>
>
> If I understand that, it's similar to allowing D code like this:
>
>
> bool foo(out int x) {
>     x = 10;
>     return true;
> }
> void main() {
>     if (foo(int y))
>         y.writeln;
> }
>
>
> Currently in D you have to write:
>
> void main() {
>     int y;
>     if (foo(y))
>         y.writeln;
> }
>
> Bye,
> bearophile

Another intesting thing for D community to know is that it will
gain a new JIT.

http://blogs.msdn.com/b/dotnet/archive/2013/11/18/ryujit-net-jit-compiler-ctp1-faq.aspx

And besides Windows Phone 8, the additional option to generate
native code for other targets as well was briefly mentioned
during the VS 2013 keynote as you can see from the comments.

--
Paulo
December 09, 2013
On Sunday, 8 December 2013 at 17:15:42 UTC, Jesse Phillips wrote:
> On Sunday, 8 December 2013 at 06:58:59 UTC, Marco Leise wrote:
>> But the verbose D syntax is just too distracting:
>>  bool function(T a, T b) { return a > b; })
>
> I think you mean "the verbose D syntax:"
>     (a, b) { return a > b; }

Maybe it is because I am a fast typer and a slow thinker, but I kind of like somewhat verbose syntax (maybe not Java level verbose, but still verbose). My brain can parse a statement with words in it much faster than it can a mess of brackets and the like.  I am a human, not a compiler.

Heck if I was designing my own programming language I'd likely have something like:

lambda(a,b) { return a > b; }

Plus I would have 'and' and 'or' instead of && and ||, just because that has always bugged me.
December 10, 2013
> http://adamralph.com/2013/12/06/ndc-diary-day-3/?1

Better explanations:

http://damieng.com/blog/2013/12/09/probable-c-6-0-features-illustrated

Bye,
bearophile
December 10, 2013
On Saturday, 7 December 2013 at 17:29:43 UTC, bearophile wrote:
> Even Ada2012 has a similar syntax. I think it's worth having in D.
>
> The ER:
> https://d.puremagic.com/issues/show_bug.cgi?id=7176
>
> Bye,
> bearophile

similar to dart, my 2nd favorite lang :)
https://www.dartlang.org/articles/idiomatic-dart/



1 2
Next ›   Last »