Jump to page: 1 2 3
Thread overview
I'm glad throw is now an expression
May 16, 2022
deadalnix
May 16, 2022
Vladimir Panteleev
May 16, 2022
max haughton
May 17, 2022
WebFreak001
May 17, 2022
Basile B.
May 17, 2022
deadalnix
May 17, 2022
Basile B.
May 18, 2022
deadalnix
May 18, 2022
Bastiaan Veelo
May 19, 2022
Bastiaan Veelo
May 19, 2022
deadalnix
May 19, 2022
Bastiaan Veelo
May 19, 2022
deadalnix
May 17, 2022
Walter Bright
May 17, 2022
max haughton
May 17, 2022
kdevel
May 17, 2022
kdevel
May 17, 2022
rikki cattermole
May 17, 2022
max haughton
May 18, 2022
Walter Bright
May 18, 2022
max haughton
May 18, 2022
Walter Bright
May 19, 2022
Vladimir Panteleev
May 19, 2022
Paul Backus
May 19, 2022
Vladimir Panteleev
May 19, 2022
kdevel
May 17, 2022
Walter Bright
May 22, 2022
Jesse Phillips
May 24, 2022
Paul Backus
May 16, 2022

So, throw is now an exception. It is true that this is useful, for instance, it is now more convenient to throw from a lambda.

This is in fact so convenient that it deserve to break compiler explorer, which do not support the feature.

In fact, it is so convenient that it was worth breaking any code formater out there (breaking new I maintain one).

In fact so much worth it that it doesn't matter it break syntax coloring in numerous text editor. Real programmers use their own fork of emacs anyways.

In fact, so extremely convenient that it is worth breaking pretty any tools around D. Who need a thriving ecosystem anyways?

In fact, so, so, so convenient that it's worth pushing it out with an invalid spec, so that the maintainers of said tools don't even have the information they require to fix it.

Listen people, I have nothing against this feature. It's true that it is great. But stop breaking everybody's tools all the time for random shit with only marginal utility. I need working tools way more than throw expressions. I need proper spec way more than throw expression. And D needs an ecosystem that is growing at some point, which is unlikely to happen breaking everybody's shit all the time.

Just bundle all these change in a big upgrade, just do done every few years, and be done with it. like any sane language does.

Bonus point: it's buggy https://issues.dlang.org/show_bug.cgi?id=23114

May 16, 2022

On Monday, 16 May 2022 at 15:18:11 UTC, deadalnix wrote:

>

This is in fact so convenient that

This post is unhelpful and toxic. By continuing to post in this tone you are hurting this community and all the work that everyone is doing and has done to get this far.

May 16, 2022

On Monday, 16 May 2022 at 15:18:11 UTC, deadalnix wrote:

>

So, throw is now an exception. It is true that this is useful, for instance, it is now more convenient to throw from a lambda.

[...]

ThrowExpressions were implemented in libdparse weeks ago. No idea if dfmt actually works with them or not but the idea this was done with absolutely no concern for the ecosystem is unfair.

May 17, 2022

On Monday, 16 May 2022 at 17:03:08 UTC, max haughton wrote:

>

On Monday, 16 May 2022 at 15:18:11 UTC, deadalnix wrote:

>

So, throw is now an exception. It is true that this is useful, for instance, it is now more convenient to throw from a lambda.

[...]

ThrowExpressions were implemented in libdparse weeks ago. No idea if dfmt actually works with them or not but the idea this was done with absolutely no concern for the ecosystem is unfair.

IMO these small syntax improvements are important to keep the language moving and alive. I didn't implement ThrowExpressions in libdparse, but I was happy to review it and we got it into libdparse promptly end of January.

D-Scanner has a tagged release and will evaluate code properly, DCD still needs a new tag but if you compiled from source you will already get a newer dsymbol version that supports it even on the same tag. dfmt's latest version also includes parsing support, but it only operates on tokens so nothing changes there really.

I think shortened methods and named arguments are also great small improvements like this.

May 17, 2022

On Monday, 16 May 2022 at 15:18:11 UTC, deadalnix wrote:

>

So, throw is now an exception. It is true that this is useful, for instance, it is now more convenient to throw from a lambda.

This is in fact so convenient that it deserve to break compiler explorer, which do not support the feature.

In fact, it is so convenient that it was worth breaking any code formater out there (breaking new I maintain one).

In fact so much worth it that it doesn't matter it break syntax coloring in numerous text editor.

Proper syntax coloring is based on the lexems and shall not break. I'd be curious to know which are the text editors that cant colorize throw anymore.

May 17, 2022
On 5/16/2022 8:18 AM, deadalnix wrote:
> Bonus point: it's buggy https://issues.dlang.org/show_bug.cgi?id=23114

This has nothing in particular to do with throwing expressions. The following fails for the same reason:

---
noreturn foo();

int test()
{
    return 1 + foo();
}
---
May 17, 2022
On Tuesday, 17 May 2022 at 19:39:14 UTC, Walter Bright wrote:
> On 5/16/2022 8:18 AM, deadalnix wrote:
>> Bonus point: it's buggy https://issues.dlang.org/show_bug.cgi?id=23114
>
> This has nothing in particular to do with throwing expressions. The following fails for the same reason:
>
> ---
> noreturn foo();
>
> int test()
> {
>     return 1 + foo();
> }
> ---

It also won't be a bug for much longer because I've just updated the implicit conversion tables.
May 17, 2022

On Tuesday, 17 May 2022 at 19:44:01 UTC, max haughton wrote:
[...]

>

It also won't be a bug for much longer because I've just updated the implicit conversion tables.

This code

void main ()
{
   auto q = throw new Exception ("test");
}

crashes my dmd v2.100.0 when compiled

$ dmd throwexpr.d
Illegal instruction (core dumped)

Is this reproducible?

May 17, 2022
On 5/17/2022 12:44 PM, max haughton wrote:
> It also won't be a bug for much longer because I've just updated the implicit conversion tables.

Quick work!
May 17, 2022

On Tuesday, 17 May 2022 at 20:06:35 UTC, kdevel wrote:
[...]

>

Is this reproducible?

Issue 23120 - dmd illegal instruction throw expression

« First   ‹ Prev
1 2 3