November 07
On Sunday, 25 June 2017 at 23:21:25 UTC, aberba wrote:
> Can you share feature(s) in D people are not talking about which you've found very useful?

I see none.

¯\_(ツ)_/¯

Everything is more or less discussed and known. I was not surprised when i saw that the topic went OT since (almost) the beginning.
November 07
On Sunday, 25 June 2017 at 23:21:25 UTC, aberba wrote:
> Can you share feature(s) in D people are not talking about which you've found very useful?

Some of the best features are in the standard library. I've written about them here:

http://nomad.so/2014/08/hidden-treasure-in-the-d-standard-library/
http://nomad.so/2015/08/more-hidden-treasure-in-the-d-standard-library/
November 07
On Tuesday, 7 November 2017 at 17:15:02 UTC, Gary Willoughby wrote:
> On Sunday, 25 June 2017 at 23:21:25 UTC, aberba wrote:
>> Can you share feature(s) in D people are not talking about which you've found very useful?
>
> Some of the best features are in the standard library. I've written about them here:
>
> http://nomad.so/2014/08/hidden-treasure-in-the-d-standard-library/
> http://nomad.so/2015/08/more-hidden-treasure-in-the-d-standard-library/

It's mentioned in Gary's articles, but std.conv.to is fantastic.
November 08
On Sunday, 25 June 2017 at 23:21:25 UTC, aberba wrote:
> Can you share feature(s) in D people are not talking about which you've found very useful?

How about this feature: i.e. it actually compiles just fine ;-)

//------------------------------------------------------------

module test;

void main()
{
    void main()
    {
        void main()
        {
            void main()
            {
                void main()
                {
                    void main()
                    {
                        void main()
                        {
                            //and so on... and so on....and so on....
                        }
                    }
                }
            }

        }
    }
}

//------------------------------------------------------------

November 08
On Wednesday, 8 November 2017 at 01:24:57 UTC, codephantom wrote:
> On Sunday, 25 June 2017 at 23:21:25 UTC, aberba wrote:
>> Can you share feature(s) in D people are not talking about which you've found very useful?
>
> How about this feature: i.e. it actually compiles just fine ;-)
>
> //------------------------------------------------------------
>
> module test;
>
> void main()
> {
>     void main()
>     {
>         void main()
>         {
>             void main()
>             {
>                 void main()
>                 {
>                     void main()
>                     {
>                         void main()
>                         {
>                             //and so on... and so on....and so on....
>                         }
>                     }
>                 }
>             }
>
>         }
>     }
> }
>
> //------------------------------------------------------------

I laughed.

At it's even funnier when you realize that there's actually generated assembly code for the nested main functions:

```
void test.main().main():
 push   %rbp
 mov    %rsp,%rbp
 sub    $0x10,%rsp
 mov    %rdi,-0x8(%rbp)
 leaveq
 retq
 xchg   %ax,%ax
```

However as you can see it only generates for one of the nested functions, the rest are omitted.

You can never call the function though :p

Next ›   Last »
1 2 3 4