On Monday, 22 January 2024 at 08:54:21 UTC, Danilo wrote:
On Monday, 22 January 2024 at 08:35:01 UTC, Joel wrote:
[...]
Nonetheless, this usually used with Objects (new class/struct
instances), like so:
```d
import std;
[...]
Fluent Interface 😀
On Monday, 22 January 2024 at 11:31:11 UTC, zjh wrote:
On Monday, 22 January 2024 at 08:54:54 UTC, zjh wrote:
```d
struct Person {
string name, email;
ulong age;
}
Person a{"n","email",33};
```
C++ can achieve ultimate `simplicity` without violating `DRY`,
And here, D violates the `D
On Monday, 22 January 2024 at 08:27:36 UTC, Joel wrote:
```d
import std;
struct Person {
string name, email;
ulong age;
auto withName(string name) { this.name=name; return this; }
auto withEmail(string email) { this.email=email; return
this; }
auto withAge(ulong age) { this
On Monday, 22 January 2024 at 15:47:23 UTC, bachmeier wrote:
On Monday, 22 January 2024 at 15:45:45 UTC, zjh wrote:
On Monday, 22 January 2024 at 15:33:01 UTC, ryuukk_ wrote:
it only took me 1 project to never want to touch C++ again..
D language used to have no `copy constructor`, isn't it
On Thursday, 25 January 2024 at 08:46:34 UTC, Renato wrote:
```d
void main() {
Person p = { "Joe", "j...@ab.com", 30};
writeln(p);
}
```
I just tested it and it works. It's `great`!
On Monday, 22 January 2024 at 11:31:11 UTC, zjh wrote:
On Monday, 22 January 2024 at 08:54:54 UTC, zjh wrote:
```d
struct Person {
string name, email;
ulong age;
}
Person a{"n","email",33};
```
C++ can achieve ultimate `simplicity` without violating `DRY`,
And here, D violates the `D
On Monday, 22 January 2024 at 15:56:59 UTC, zjh wrote:
On Monday, 22 January 2024 at 15:51:37 UTC, zjh wrote:
I spent `too much time` on D.
And some of the inherent `drawbacks` of `C++` are too hateful.
It's a package deal. Everything in C++ is there because there
were benefits when they a
On Monday, 22 January 2024 at 15:51:37 UTC, zjh wrote:
I spent `too much time` on D.
And some of the inherent `drawbacks` of `C++` are too hateful.
On Monday, 22 January 2024 at 15:47:23 UTC, bachmeier wrote:
Sounds like you should be using C++. Why are you here?
I spent `too much time` on D.
On Monday, 22 January 2024 at 15:14:32 UTC, Bkoie wrote:
D is totally different from C++ in D you usually you wont
construct the struct directly use alias as.
Stop being `unconventional` and quickly copy their `good things`.
Otherwise, the `development speed` of the D language is really
`too
On Monday, 22 January 2024 at 15:45:45 UTC, zjh wrote:
On Monday, 22 January 2024 at 15:33:01 UTC, ryuukk_ wrote:
it only took me 1 project to never want to touch C++ again..
D language used to have no `copy constructor`, isn't it now
added in again?
You have to admit the good aspects of `
On Monday, 22 January 2024 at 15:33:01 UTC, ryuukk_ wrote:
it only took me 1 project to never want to touch C++ again..
D language used to have no `copy constructor`, isn't it now added
in again?
You have to admit the good aspects of `C++`.
You should take a look at the `latest C++`. C++ ha
I should note that it only took me 1 project to never want to
touch C++ again.. that must be telling something, either about
the language, or me, or both lol
On Monday, 22 January 2024 at 11:31:11 UTC, zjh wrote:
On Monday, 22 January 2024 at 08:54:54 UTC, zjh wrote:
```d
struct Person {
string name, email;
ulong age;
}
Person a{"n","email",33};
```
C++ can achieve ultimate `simplicity` without violating `DRY`,
And here, D violates the `D
On Monday, 22 January 2024 at 11:31:11 UTC, zjh wrote:
On Monday, 22 January 2024 at 08:54:54 UTC, zjh wrote:
C++ can achieve ultimate `simplicity` without violating `DRY`,
And here, D violates the `DRY` principle!
Moreover, as the `package level, module level, class level,
member level`, D lang
On Monday, 22 January 2024 at 08:54:54 UTC, zjh wrote:
```d
struct Person {
string name, email;
ulong age;
}
Person a{"n","email",33};
```
C++ can achieve ultimate `simplicity` without violating `DRY`,
And here, D violates the `DRY` principle!
Moreover, as the `package level, module l
On Monday, 22 January 2024 at 11:31:11 UTC, zjh wrote:
D language violates integrity.
Because D has no `class level` limit.
These are all not `serious states`.
It seems that D language is not `professional`.
On Monday, 22 January 2024 at 08:54:54 UTC, zjh wrote:
On Monday, 22 January 2024 at 08:27:36 UTC, Joel wrote:
```d
import std;
struct Person {
string name, email;
ulong age;
auto withName(string name) { this.name=name; return this; }
auto withEmail(string email) { this.email=e
On Monday, 22 January 2024 at 08:54:54 UTC, zjh wrote:
VS:`C++`
```d
struct Person {
string name, email;
ulong age;
}
Person a{"n","email",33};
```
It's not much different in D. ;)
```d
import std;
struct Person {
string name, email;
ulong age;
}
void main() {
auto p = P
On Monday, 22 January 2024 at 08:54:21 UTC, Danilo wrote:
It's common OOP style in some frameworks.
With latest D you can also just use named parameters:
```d
import std;
struct Person {
/*private*/ string name, email;
/*private*/ ulong age;
}
void main() {
auto p = Person(
On Monday, 22 January 2024 at 08:54:54 UTC, zjh wrote:
On Monday, 22 January 2024 at 08:27:36 UTC, Joel wrote:
```d
import std;
struct Person {
string name, email;
ulong age;
auto withName(string name) { this.name=name; return this; }
auto withEmail(string email) { this.email=e
On Monday, 22 January 2024 at 08:27:36 UTC, Joel wrote:
```d
import std;
struct Person {
string name, email;
ulong age;
auto withName(string name) { this.name=name; return this; }
auto withEmail(string email) { this.email=email; return
this; }
auto withAge(ulong age) { thi
On Monday, 22 January 2024 at 08:35:01 UTC, Joel wrote:
I've lost interest in the video, looks like horrible syntax
(F#).
Nonetheless, this usually used with Objects (new class/struct
instances), like so:
```d
import std;
struct Person {
string name, email;
ulong age;
auto withNa
On Monday, 22 January 2024 at 08:27:36 UTC, Joel wrote:
I've been watching a video (YouTube - "Pipeline-oriented
programming - Scott Wlaschin - NDC Porto 2023") with something
like the following code. This only sets the first method call,
so I'm wanting to know how to make this work, for the
s
I've been watching a video (YouTube - "Pipeline-oriented
programming - Scott Wlaschin - NDC Porto 2023") with something
like the following code. This only sets the first method call, so
I'm wanting to know how to make this work, for the subsequent
methods.
```d
import std;
struct Person {
25 matches
Mail list logo