On Monday, 16 March 2015 at 12:53:24 UTC, Nick Treleaven wrote:
0b1010 binary literals (even though C++11 supports them)
0xABCD hex literals (but useful for porting C)
And while we're at it, why not remove those pesky base-10
literals as well? Shouldn't be too hard to write dec!"123456"
instead
I've been writing a lot of generic code lately that has to deal
with various kinds of numbers, and have near been driven nuts by
the fact there is no uniform way to get a zero or one.
Consider:
void foo(T)(T a) {}
foo!T(0);
Does this work with all built-in numeric types? Yes.
Does it w
On Friday, 17 April 2015 at 13:33:36 UTC, Adam D. Ruppe wrote:
On Friday, 17 April 2015 at 13:27:19 UTC, Biotronic wrote:
void foo(T)(T a) {}
foo!T(0);
Does foo(T(0)); work? It seems like it should
void foo(T)(T a) {}
import std.bigint;
import std.complex;
void main() {
foo(BigI
https://imgflip.com/i/lcf39
On Thursday, 3 August 2017 at 08:47:12 UTC, Martin Tschierschke
wrote:
Can you point me to the explanation of this: %(%02X %)%*s %s ?
https://dlang.org/phobos/std_format.html
Under "Example using array and nested array formatting:"
writefln("My items are %(%s %).", [1,2,3]);
So "%( %)" is
On Monday, 14 August 2017 at 11:25:14 UTC, Stefan Koch wrote:
On Tuesday, 1 August 2017 at 21:27:32 UTC, Stefan Koch wrote:
[ ... ]
Guys,
newCTFE is green on 64 and 32bit!
I've finally fixed || and &&.
For good!
whoho ;)
Release is coming closer!
There are times I wish the D foru
On Tuesday, 15 August 2017 at 16:10:40 UTC, Johnson wrote:
I'm sorry, but you are obviously someone in *need* to prove
something. No need to respond, ever.
You need to grow up.
When Moritz commented on your use of 'do' as a function name,
that may have been unnecessary for a discussion of you
On Thursday, 24 August 2017 at 11:07:16 UTC, Suliman wrote:
All modern languages like Dart and C# have string
interpolation. Sharp example:
Console.WriteLine($"Hello {args[0]}!");
Who can summary is there any objective reasons why it's not
realized in D?
As Raymond Chen once said[1], becaus
On Friday, 25 August 2017 at 00:43:56 UTC, Walter Bright wrote:
On 8/24/2017 12:08 PM, Jacob Carlborg wrote:
D can already link with C++, but not all features are
supported. Like lambdas, for example, are not supported.
I have no idea how that would even work. Since lambdas are
nested functio
On Monday, 25 September 2017 at 13:45:05 UTC, Jean-Louis Leroy
wrote:
Thank you all for your input. I will file a bug report.
Just reopen the old one:
https://issues.dlang.org/show_bug.cgi?id=2484
--
Biotronic
On Tuesday, 10 October 2017 at 22:16:00 UTC, sarn wrote:
On Tuesday, 10 October 2017 at 21:38:41 UTC, captaindet wrote:
string a = |q{
firstLine();
if (cond) {
secondLine()
}
};
you could write your own
On Monday, 23 October 2017 at 12:48:33 UTC, Atila Neves wrote:
On Monday, 23 October 2017 at 09:13:45 UTC, Satoshi wrote:
writeln(`Foo is {foo} and bar is {bar}`);
writeln("Foo is ", foo, "and bar is ", bar");
Two more characters.
You have actually demonstrates exactly what I feel is the ma
On Thursday, 2 November 2017 at 11:13:34 UTC, Jean-Yves Vion-Dury
wrote:
src\stores.d(178): Error: none of the overloads of 'spawnFiber'
are callable using argument types (void delegate(LRMSFiber f),
string, uint, string), candidates are:
src\fiberManager.d(77):
fiberManager.FiberManager
On Monday, 6 November 2017 at 10:12:11 UTC, Jonathan M Davis
wrote:
x ? x : y
and make it
x ?: y
It saves 2 characters plus the length of the variable name.
That's it.
I find I often use this in C# with a more complex expression on
the left-hand side, like a function call. A quick search s
On Wednesday, 15 November 2017 at 14:56:53 UTC, Andrei
Alexandrescu wrote:
Hello, for all of you with expertise in graphics, we'd be in
your debt if you could create a logo for DConf 2018. Proposals
would be appreciated!
Thanks,
Andrei
Hastily scribbled on graph paper because I liked the id
On Monday, 20 November 2017 at 08:49:41 UTC, rumbu wrote:
In fact, this is the introduction of a new operator "!",
probably named "I know better" operator.
It's called the "bang" operator, because of how things blow up
when you're wrong.
On Tuesday, 12 December 2017 at 16:12:50 UTC, Adam D. Ruppe wrote:
Ugh. Or why is _this_ italic?
I know! /This should be italic./ _This should be underlined._ How
anyone could manage to mess those up is way beyond me. Some
digging indicates it's a decision based on the fact that both are
use
On Monday, 3 April 2017 at 11:16:57 UTC, Dejan Lekic wrote:
I know people her do not like to see proposals that change (add
stuff to) the language. However, I strongly feel that for the
testing purposes D should provide means to patch any object (no
matter whether it is final or not!). Therefor
On Wednesday, 10 May 2017 at 11:45:05 UTC, Moritz Maxeiner wrote:
[CTFE slow]
First, as you may know, Stefan Koch is working on an improved
CTFE engine that will hopefully make things a lot better.
As for making the code faster right now, could this be done with
mixin templates instead?
Som
On Monday, 26 June 2017 at 19:31:53 UTC, Moritz Maxeiner wrote:
the good *way* to achieve this result would be the following:
- When visiting `startFoo`, the compiler automatically
aggregates all different exceptions it may throw and stores the
resulting set
- If `startFoo` is going to be part
On Thursday, 6 July 2017 at 14:59:10 UTC, Crayo List wrote:
On Wednesday, 5 July 2017 at 21:05:04 UTC, Ola Fosheim Grøstad
wrote:
On Wednesday, 5 July 2017 at 15:48:33 UTC, Crayo List wrote:
What happens to the 3000 direct and indirect calls to open() ?
Notice how the 'interface' has not chang
On Thursday, 30 July 2015 at 10:40:59 UTC, Atila Neves wrote:
There's still the problem of having two names for each
constraint: checkInputRange and isInputRange. But... we could
also establish the convention of checkXXX and use string mixins
to turn this:
@satifies!(isInputRange, MyRange)
i
On Tuesday, 12 January 2016 at 04:29:00 UTC, Manu wrote:
Can you see the pointless-ness of
this feature and the effort being asked?
It is against my interest to spend time (that I don't have) to
make
this feature work, when I am 100% convinced it is a massive
anti-feature and I just want to see
On Monday, 26 September 2016 at 09:35:32 UTC, Anonymouse wrote:
On Friday, 23 September 2016 at 20:42:26 UTC, Nick Sabalausky
wrote:
Just had to say it. Been using it a lot this week.
Referring to this stuff:
/// Does foo stuff
void foo()
{}
///
unittest
{
//
24 matches
Mail list logo