On Monday, 28 July 2025 at 18:02:45 UTC, H. S. Teoh wrote:
On Sun, Jul 27, 2025 at 05:02:35PM +, user1234 via
Digitalmars-d-learn wrote: [...]
Simply because because if OP writes
```
class Person{
string name;
this(string name){this.name=name;}
}
class Someone:Person{
}
void main(){
still want this:
https://forum.dlang.org/thread/lmvyzfatklcvrijcy...@forum.dlang.org
I dont think it will magicly appear in a few hours but maybe
someone wants to write the templated opApply code
some active code:
```d
auto takewhilecmp(string op="<",R,T)(R r,ref T senti){
struct ran
On Monday, 28 July 2025 at 18:57:27 UTC, kinke wrote:
On Monday, 28 July 2025 at 14:28:57 UTC, Mike Shah wrote:
Is there somewhere already in LDC2 where I can dump out the
generated transformation (Otherwise I can probably read the IR
well enough)?
Yeah I'm afraid the IR is probably the best
On Monday, 28 July 2025 at 14:28:57 UTC, Mike Shah wrote:
Is there somewhere already in LDC2 where I can dump out the
generated transformation (Otherwise I can probably read the IR
well enough)?
Yeah I'm afraid the IR is probably the best source. LDC's `-vv`
verbose codegen output would show
On Monday, 28 July 2025 at 11:18:48 UTC, Nick Treleaven wrote:
In Phobos 3 `isCallable` will likely be replaced. I think when
it was made to support some templates with `!()`, that muddied
the waters.
Whack-a-moleing; you guys do that allot
The solution I offered at the time while still fun
On Sun, Jul 27, 2025 at 05:02:35PM +, user1234 via Digitalmars-d-learn
wrote:
[...]
> Simply because because if OP writes
>
> ```
> class Person{
> string name;
> this(string name){this.name=name;}
> }
> class Someone:Person{
> }
> void main(){
> Someone x=new Someone("Bob");
> }
On Monday, 28 July 2025 at 12:25:39 UTC, kinke wrote:
On Monday, 28 July 2025 at 04:39:00 UTC, Mike Shah wrote:
[...]
I think that's where the confusion comes from, that misleading
`-vcg-ast` output for the loop-body-lambda, apparently printed
as `… => 0` regardless of the actual loop body.
On Monday, 28 July 2025 at 11:06:40 UTC, kinke wrote:
On Sunday, 27 July 2025 at 23:23:40 UTC, user1234 wrote:
That is confusing
It affects the mangling of global vars, just like functions.
ah indeed
On Monday, 28 July 2025 at 04:39:00 UTC, Mike Shah wrote:
**So really my one concrete question is** -- can I see
main.main()__foreachbody_L21_C3(ref int) anywhere?
I think that's where the confusion comes from, that misleading
`-vcg-ast` output for the loop-body-lambda, apparently printed as
On Saturday, 26 July 2025 at 23:08:35 UTC, luafyn wrote:
Why doesn't this work?
```d
import std;
struct Optional(T)
{
T value;
bool hasValue;
}
auto map(alias fn, T)(Optional!T m)
{
alias U = ReturnType!fn;
In this case, an untyped function literal (`it => 123`) is
actually a te
On Sunday, 27 July 2025 at 23:23:40 UTC, user1234 wrote:
That is confusing
It affects the mangling of global vars, just like functions.
On Sunday, July 27, 2025 5:23:40 PM Mountain Daylight Time user1234 via
Digitalmars-d-learn wrote:
> That is confusing, e.g
>
> ```
> extern(C) int r;
>
> int main()
> {
> return r;
> }
> ```
>
> works. But what is likely more intended here is
>
> ```
> extern int r;
>
> int main()
> {
>
12 matches
Mail list logo