On Saturday, 13 May 2017 at 00:59:14 UTC, Stanislav Blinov wrote:
On Saturday, 13 May 2017 at 00:36:55 UTC, mogu wrote:
```d
if (null)
"1".writeln;
if ("")
"2".writeln;
if ("" == null)
"3".writeln;
```
Output:
2
3
How to understand this?
Boolean conversion on an array works on ar
```d
if (null)
"1".writeln;
if ("")
"2".writeln;
if ("" == null)
"3".writeln;
```
Output:
2
3
How to understand this?
On Monday, 3 April 2017 at 18:24:31 UTC, Meta wrote:
On Monday, 3 April 2017 at 08:53:57 UTC, Andrea Fontana wrote:
https://isocpp.org/files/papers/p0636r0.html
The fold expressions and inference of constructor template args
look very nice. C++ is quickly catching up to D in a lot of
areas,
As I know, native languages like rust, go, pony, crystal all can
recover from dividing zero fault.
On Thursday, 3 November 2016 at 22:32:17 UTC, Stefan Koch wrote:
On Thursday, 3 November 2016 at 22:29:34 UTC, Jerry wrote:
So I was thinking of a way of extending if statements that
have declarations. The following being as example of the
current use of if statements with declarations:
[..
On Thursday, 27 October 2016 at 04:33:30 UTC, Stefan Koch wrote:
On Thursday, 27 October 2016 at 02:36:13 UTC, Stefam Koch wrote:
Trivial.
Fix is comeing.
Okay it was less trivial then it should have been.
Great job gcc.
-Wno-narrowing does not cover all g++ tasks.
On Sunday, 23 October 2016 at 01:31:47 UTC, Seb wrote:
On Saturday, 22 October 2016 at 21:26:53 UTC, Patric Dexheimer
wrote:
S[] s = [{ 1, 2 }];
Nice, did´n knew that it worked.
On Friday, 21 October 2016 at 21:41:16 UTC, Daniel Kozak wrote:
Because there is no need. In c++ it is disaster beca
Allow new syntax makes codes simpler in some cases:
writeln({
int a = 5;
return a + 5;
}());
=>
writeln{
int a = 5;
return a + 5;
}();
[1,2,3].fold!((a, b) => a + b).writeln;
=>
[1,2,3].fold!{a, b => a + b}.writeln;
On Friday, 21 October 2016 at 14:22:27 UTC, Steven Schveighoffer
wrote:
On 10/21/16 10:12 AM, Temtaime wrote:
On Friday, 21 October 2016 at 13:42:49 UTC, Adam D. Ruppe
wrote:
On Friday, 21 October 2016 at 13:33:26 UTC, Stefan Koch wrote:
[...]
Eh, that's exactly what the language rules say s
On Friday, 21 October 2016 at 10:05:40 UTC, Daniel Kozak wrote:
Or you can build your own version of dmd with PIC enabled and
add -fPIC to /etc/dmd.conf
I rebuilded phobos and druntime with -fPIC and replaced the
static libphobos2.a. Now it works well. But I have to specified
-fPIC to dmd eac
On Friday, 21 October 2016 at 06:50:26 UTC, Dennis Ritchie wrote:
The problem is that D is not macros, and the implementation of
pattern matching without macros will not be very good. In turn,
the implementation of macros in D - this is also not a good
idea.
Agreed. D has not macro, this ma
$ dmd hello.d
/usr/bin/ld: hello.o: relocation R_X86_64_32 against symbol
`__dmd_personality_v0' can not be used when making a shared
object; recompile with -fPIC
/usr/bin/ld:
/usr/lib/x86_64-linux-gnu/libphobos2.a(exception_224_3b4.o):
relocation R_X86_64_32 against symbol `__dmd_personality_
On Tuesday, 6 September 2016 at 05:38:28 UTC, Manu wrote:
On 6 September 2016 at 14:22, Daniel Kozak via Digitalmars-d
wrote:
Dne 6.9.2016 v 03:41 Manu via Digitalmars-d napsal(a):
On 6 September 2016 at 09:51, John Colvin via Digitalmars-d
wrote:
On Monday, 5 September 2016 at 22:17:59 U
On Tuesday, 6 September 2016 at 01:17:00 UTC, Timothee Cour wrote:
is there a way to do this efficiently with associative arrays:
aa[key]=value;
auto ptr=key in aa;
without suffering the cost of the 2nd search (compiler should
know ptr during aa[key]=value but it's not exposed it seems)
auto
Link:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0091r1.html
And we have DIP40:
http://wiki.dlang.org/DIP40
Is someone there to renew it in new DIPs repo? T.T
On Friday, 1 July 2016 at 01:43:40 UTC, Seb wrote:
On Thursday, 30 June 2016 at 23:49:16 UTC, mogu wrote:
Could dlang.org filter IP addresses from China and use another
gravatar mirrors? Here's one solution:
https://wordpress.org/plugins/wp-duoshuo-gravatar/
Now I have to always open the VPN t
On Friday, 1 July 2016 at 01:35:51 UTC, Jack Stouffer wrote:
On Thursday, 30 June 2016 at 23:49:16 UTC, mogu wrote:
Could dlang.org filter IP addresses from China and use another
gravatar mirrors? Here's one solution:
https://wordpress.org/plugins/wp-duoshuo-gravatar/
Now I have to always open
Could dlang.org filter IP addresses from China and use another
gravatar mirrors? Here's one solution:
https://wordpress.org/plugins/wp-duoshuo-gravatar/
Now I have to always open the VPN to access the forum. This may
blocks many people interested in D from China. Please help.
On Monday, 27 June 2016 at 00:13:46 UTC, mogu wrote:
On Friday, 8 May 2015 at 13:57:56 UTC, Andrea Fontana wrote:
Is "multiple alias this" implementation planned in near
future? It could be useful for a project of mine :)
I need it too, and also do static inheritance.
http://wiki.dlang.org/DIP
On Friday, 8 May 2015 at 13:57:56 UTC, Andrea Fontana wrote:
On Saturday, 27 December 2014 at 12:28:34 UTC, Joseph Rushton
Wakeling wrote:
On 26/12/14 19:53, Daniel N via Digitalmars-d wrote:
Anyway considering the new ways of working, when using the
-dip switch for the
initial few releases, th
On Sunday, 26 June 2016 at 22:32:55 UTC, Walter Bright wrote:
On 6/26/2016 10:18 AM, Enamex wrote:
- template arguments that accept constant values of any type
whatsoever
'template';
Still adding D features, I see!
Now cpp has structured bindings although it's a limited version
of match.
On Sunday, 19 June 2016 at 15:06:40 UTC, David Nadlinger wrote:
On Sunday, 19 June 2016 at 14:05:22 UTC, mogu wrote:
It's awful that I compile a little 64bit program(or
-m32mscoff) in windows must have visual studio which has
tremendous size installed even though I only need a linker.
It's wei
On Sunday, 19 June 2016 at 15:06:40 UTC, David Nadlinger wrote:
On Sunday, 19 June 2016 at 14:05:22 UTC, mogu wrote:
It's awful that I compile a little 64bit program(or
-m32mscoff) in windows must have visual studio which has
tremendous size installed even though I only need a linker.
It's wei
On Sunday, 19 June 2016 at 15:00:07 UTC, Rene Zwanenburg wrote:
Don't underestimate the value of fast compilation, it's
incredibly useful while writing code.
Sorry for my tone. After waste so much time, I've been a little
mad. :(
In fact, I'm an advocator of meta-programming.
Moreover, I wonder if D is really a cross-platform programming
language?! The official dmd only supports x86 structure. You can
never build a project with third party static library in windows
independently. And how I can build an android program? LDC2? So
what dmd is? Only for a bit faster com
Today, I'm working on a private GUI tool which must be run at
linux and windows. It's awful that I compile a little 64bit
program(or -m32mscoff) in windows must have visual studio which
has tremendous size installed even though I only need a linker.
It's weird that a compiler compiles to binary
On Saturday, 11 June 2016 at 03:19:52 UTC, Meta wrote:
On Saturday, 11 June 2016 at 00:38:24 UTC, mogu wrote:
编 可以是 编写 的缩写
编 could be short for 编写(write)
程 可以是 程序 的缩写
程 could be short for 程序(program)
编程 即 编写程序
So 编程 means writing programs aka programming.
谢谢你纠正我,说中文不容易的。
哪里哪里,中文的确很难,但同时也是最有魅
On Friday, 10 June 2016 at 21:32:47 UTC, Meta wrote:
On Friday, 10 June 2016 at 20:47:16 UTC, Ola Fosheim Grøstad
wrote:
On Friday, 10 June 2016 at 15:04:52 UTC, Ali Çehreli wrote:
src/ders/d.cn/编程在D.print.pdf
src/ders/d.cn/编程在D.pdf
Is "programming" composed as "edit journey" in chinese?
On Sunday, 29 May 2016 at 10:56:57 UTC, Russel Winder wrote:
This is why LDC should be seen in the D community as the main
production toolchain, and Dub should default to LDC for
compilation.
Agreed. Especially, LDC supports more platform.
On Wednesday, 25 May 2016 at 03:07:31 UTC, Mike Parker wrote:
This is because dub is apparently compiling with warnings ...
Thanks for your answer. And sorry for that this thread should be
in Learn section now i think.
I use dub 0.9.25, DMD64 D Compiler v2.071.0. Create a minimal
project and write the following codes in main function.
```
import std.math;
long i = 0;
i += 3.5.floor;
```
Then run dub will get a warning and dmd failed.
```
source/app.d(4,7): Warning: long += double is performing
truncating co
On Tuesday, 10 May 2016 at 21:49:10 UTC, Nordlöw wrote:
On Tuesday, 10 May 2016 at 21:33:47 UTC, Stefan Koch wrote:
On Tuesday, 10 May 2016 at 21:30:35 UTC, Timon Gehr wrote:
Kill it.
I agree.
Agreed. Builtin tuple syntax is far more useful.
+1. And personally, match is expected then.
32 matches
Mail list logo