Lawrence Aberba comments
Comments by Lawrence Aberba
Commented on 4 Aug 2020
The feature that makes D my favorite programming language
Or make it a one-liner:
import std.stdio : writeln;
import std.uni : asLowerCase, asCapitalized;
void main()
{
"D IS COOL"
.asLowerCase
.asCapitalized
.writeln;
}
Commented on 4 Aug 2020
The feature that makes D my favorite programming language
Hi Steeve, I see similar comments quite often. Most of the D programmers are/were also C++ guys also. Part of why D has one of the strongest C/C++ code interoperability.
Commented on 4 Aug 2020
The feature that makes D my favorite programming language
Yes, you can totally do something like that:
mport std.stdio : writeln;
import std.uni : asLowerCase, asCapitalized;
void main()
{
string mySentence = "D IS COOL";
mySentence
.asLowerCase
....
Commented on 28 Jul 2020
The feature that makes D my favorite programming language
You're right! It didn't come to mind. I'll include that in my next article.
Commented on 28 Jul 2020
The feature that makes D my favorite programming language
You're right! It didn't come to mind. I'll include that in my next article.
Commented on 28 Jul 2020
The feature that makes D my favorite programming language
Yeah, I'm actually written more about that next.
Commented on 28 Jul 2020
The feature that makes D my favorite programming language
Hey Arthur, UFCS helps avoid writing code like: finish(make(bake(1,4)));
In D you can write it as: bake(1,2).make(). finish () OR more idiomatically, 1.bake(3).make.finish. So it reads in the order you'd process it in your...
Commented on 28 Jul 2020
The feature that makes D my favorite programming language
I'm not familiar with .Net extensions. However with D, the compiler rewrites it like how you'd normal call it. So it's a convenient syntax for the programmer.
So 1.add(2): gets rewritten to add(2,2) during compilation.
Commented on 23 Jul 2020
The feature that makes D my favorite programming language
You should definitely try it. You can start at https://tour.dlang.org
Commented on 23 Jul 2020
The feature that makes D my favorite programming language
The compiler rewrites it so how you would normally write it. So its a convenience for the developer.
- Load more