October 21 General » Re: Top 3 use cases for D | |||
|---|---|---|---|
| |||
...analogy is probably C++. Even if a main GUI lib were separate from phobos, having... | |||
October 21 DIP Ideas » Re: Static functions calls should only resolve to static functions | |||
|---|---|---|---|
| |||
...foo(byte) {}
static void foo(int) {}
}
void main()
{
byte arg;
S.foo(arg); // resolves to... | |||
October 21 DIP Ideas » Static functions calls should only resolve to static functions | |||
|---|---|---|---|
| |||
...T...)(T args) {
writeln("static foo");
}
}
void main(){
A.foo(1,true); // calling non-static... | |||
October 19 Learn » Re: List classes at compile time | |||
|---|---|---|---|
| |||
...ModuleInfo.localClasses
```d
import std.stdio;
void main() {
// ModuleInfo without parenthesis will call opDelegate to... | |||
October 18 Learn » Re: Capturing by value in the thread | |||
|---|---|---|---|
| |||
...auto work = captureFuction(i);
items ~= work;
}
foreach(worker; items)
{
worker();
}
}
int main()
{
aa();
return 0;
}
``` | |||
October 18 Learn » Re: Would appreciate some help porting Q3VM to D (mainly C macros and type conversions) | |||
|---|---|---|---|
| |||
...at your code:
import std.stdio;
void main(){
int op = 1;
switch(op){
default: writeln... | |||
October 18 Learn » Capturing by value in the thread | |||
|---|---|---|---|
| |||
...localFoo(int x) {
return (){ return x;};
}
void main() {
int x = 10;
auto lambda = (int capturedX... | |||
October 18 Issues » [Issue 24820] Associative arrays do not correctly handle keys with copy constructors | |||
|---|---|---|---|
| |||
...doesn't actually get triggered with what main is doing, so it doesn't really... | |||
October 18 Issues » [Issue 24820] New: Associative arrays do not correctly handle keys with copy constructors | |||
|---|---|---|---|
| |||
...com
This code
```
import std.stdio;
void main()
{
auto count = new Count;
string[S] aa... | |||
October 18 Learn » Re: Scope & Structs | |||
|---|---|---|---|
| |||
...statements into a try finally:
```d
void main()
{
S s = 0;
try
{
if (true)
return... | |||
Copyright © 1999-2021 by the D Language Foundation