string stt = "none";
true?writeln("AA"):writeln("BB"); ///Out:AA
true?stt="AA":stt="BB";-///Out:BB
writeln(stt);
On Saturday, April 07, 2018 09:07:48 sdvcn via Digitalmars-d wrote:
> string stt = "none";
> true?writeln("AA"):writeln("BB"); ///Out:AA
> true?stt="AA":stt="BB";-///Out:BB
> writeln(stt);
Assignment takes precendence over the ternary operator. So, no, I don't
think th
On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
true?stt="AA":stt="BB";-///Out:BB
It's an UB.
Not a bug.
Am 07.04.2018 um 04:23 schrieb Andrei Alexandrescu:
Why is there a space before "(" in our /library/ docs?
https://dlang.org/library/std/stdio/file.tmpfile.html
The paren here has role similar to that in mathematics, not literary.
Thanks,
Andrei
Has been a regression during the diet-ng tra
On Saturday, 7 April 2018 at 10:25:19 UTC, bauss wrote:
On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
true?stt="AA":stt="BB";-///Out:BB
It's an UB.
Not a bug.
I want `condition ? expr1 : expr2` to behave like:
-
auto qc( alias condition, string expr1, st
On Saturday, 7 April 2018 at 11:19:44 UTC, meppl wrote:
On Saturday, 7 April 2018 at 10:25:19 UTC, bauss wrote:
On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
true?stt="AA":stt="BB";-///Out:BB
It's an UB.
Not a bug.
I want `condition ? expr1 : expr2` to behav
On Saturday, 7 April 2018 at 09:56:43 UTC, Jonathan M Davis wrote:
true?stt="AA":stt="BB";-///Out:BB
[...]
Assignment takes precendence over the ternary operator.
That's not true. Not in D and not in C/C++
https://wiki.dlang.org/Operator_precedence
http://en.cppreferenc
On Saturday, 7 April 2018 at 10:25:19 UTC, bauss wrote:
On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
true?stt="AA":stt="BB";-///Out:BB
It's an UB.
Not a bug.
Why UB? stt is only modified once.
On Friday, 6 April 2018 at 14:03:18 UTC, Abdulhaq wrote:
On Friday, 6 April 2018 at 13:10:07 UTC, jason wrote:
what is this?
It's a perl program that converts D code into APL
+1
On Saturday, April 07, 2018 14:29:15 kdevel via Digitalmars-d wrote:
> On Saturday, 7 April 2018 at 10:25:19 UTC, bauss wrote:
> > On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
> >> true?stt="AA":stt="BB";-///Out:BB
> >
> > It's an UB.
> >
> > Not a bug.
>
> Why UB? st
On Saturday, April 07, 2018 14:28:05 kdevel via Digitalmars-d wrote:
> On Saturday, 7 April 2018 at 09:56:43 UTC, Jonathan M Davis wrote:
> >> true?stt="AA":stt="BB";-///Out:BB
>
> [...]
>
> > Assignment takes precendence over the ternary operator.
>
> That's not true. Not in D
On Saturday, 7 April 2018 at 14:43:53 UTC, Jonathan M Davis wrote:
On Saturday, April 07, 2018 14:29:15 kdevel via Digitalmars-d
wrote:
On Saturday, 7 April 2018 at 10:25:19 UTC, bauss wrote:
> On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
>> true?stt="AA":stt="BB";
On 04/07/2018 02:07 AM, sdvcn wrote:
string stt = "none";
true?writeln("AA"):writeln("BB"); ///Out:AA
true?stt="AA":stt="BB"; -///Out:BB
writeln(stt);
It is a bug because the behavior does not match the spec:
https://issues.dlang.org/show_bug.cgi?id=18743
On Saturday, 7 April 2018 at 14:28:05 UTC, kdevel wrote:
On Saturday, 7 April 2018 at 09:56:43 UTC, Jonathan M Davis
wrote:
true?stt="AA":stt="BB";-///Out:BB
[...]
Assignment takes precendence over the ternary operator.
That's not true. Not in D and not in C/C++
The
On Saturday, 7 April 2018 at 15:26:56 UTC, Ali Çehreli wrote:
On 04/07/2018 02:07 AM, sdvcn wrote:
string stt = "none";
true?writeln("AA"):writeln("BB"); ///Out:AA
true?stt="AA":stt="BB"; -///Out:BB
writeln(stt);
It is a bug because the behavior does not ma
On 04/07/2018 10:53 AM, Ali wrote:
> On Saturday, 7 April 2018 at 15:26:56 UTC, Ali Çehreli wrote:
>> On 04/07/2018 02:07 AM, sdvcn wrote:
>>> string stt = "none";
>>> true?writeln("AA"):writeln("BB"); ///Out:AA
>>> true?stt="AA":stt="BB";-///Out:BB
>>> writel
On Saturday, 7 April 2018 at 18:52:56 UTC, Ali Çehreli wrote:
On 04/07/2018 10:53 AM, Ali wrote:
> On Saturday, 7 April 2018 at 15:26:56 UTC, Ali Çehreli wrote:
>> On 04/07/2018 02:07 AM, sdvcn wrote:
>>> string stt = "none";
>>> true?writeln("AA"):writeln("BB"); ///Out:AA
>>>
Hello :)
Tried to add a new package, but after clicking on [Register
package] I only get the following error:
502 Bad Gateway
nginx/1.6.2
Regards,
Elias
jesus that became a long title.
Anyway as the title says, is it a bug that a parent class that
access its own private members from derived classes gets
deprecation warning?
Scenario narrowed down:
// module foo;
class Foo
{
private:
bool _baz;
public:
final void foos(T : Foo
On Saturday, 7 April 2018 at 20:14:49 UTC, bauss wrote:
foreach (child; values)
{
child._isChild = true;
}
I forgot: _isChild should be _baz in the narrowed down version.
On Saturday, 7 April 2018 at 19:49:31 UTC, 0xEAB wrote:
Hello :)
Tried to add a new package, but after clicking on [Register
package] I only get the following error:
502 Bad Gateway
nginx/1.6.2
Regards,
Elias
I don't think that was the case.
code.dlang.org has been having a lot of issu
On Saturday, 7 April 2018 at 20:14:49 UTC, bauss wrote:
jesus that became a long title.
Anyway as the title says, is it a bug that a parent class that
access its own private members from derived classes gets
deprecation warning?
If the import is selective no. (`import foo : Foo;`)
If the imp
On Saturday, 7 April 2018 at 20:17:41 UTC, bauss wrote:
On Saturday, 7 April 2018 at 19:49:31 UTC, 0xEAB wrote:
Hello :)
Tried to add a new package, but after clicking on [Register
package] I only get the following error:
502 Bad Gateway
nginx/1.6.2
Regards,
Elias
I don't think that wa
On Saturday, 7 April 2018 at 20:46:39 UTC, bauss wrote:
The problem is that "Foo" cannot access "_baz" without
deperecation warning, but "_baz" is a part of "Foo".
I'm not trying to access "_baz" directly from "Bar" except for
that I call the templated function that access "_baz", but that
fu
On Saturday, 7 April 2018 at 20:34:57 UTC, user1234 wrote:
On Saturday, 7 April 2018 at 20:14:49 UTC, bauss wrote:
jesus that became a long title.
Anyway as the title says, is it a bug that a parent class that
access its own private members from derived classes gets
deprecation warning?
If
On Saturday, 7 April 2018 at 20:44:12 UTC, 0xEAB wrote:
On Saturday, 7 April 2018 at 20:17:41 UTC, bauss wrote:
On Saturday, 7 April 2018 at 19:49:31 UTC, 0xEAB wrote:
Hello :)
Tried to add a new package, but after clicking on [Register
package] I only get the following error:
502 Bad Gate
On Saturday, 7 April 2018 at 16:52:00 UTC, Patrick Schluter wrote:
[...]
The odd man out is C++ [1], assignment has higher precedence
because of right to left evaluation.
Your reference [1] is not even a witness to your claim. The
precedence table says that the "Ternary conditional" has the
*
On Saturday, 7 April 2018 at 19:44:35 UTC, Ali wrote:
so it seems
that since
b = (true ? stt="AA": stt )="BB";
and
b = true ? stt="AA": stt ="BB";
are equivalent
that
that the ternary operator return stt (after assigning it "AA")
then assign "BB" to it
Can the ternary conditional eve
Am 07.04.2018 um 21:49 schrieb 0xEAB:
Hello :)
Tried to add a new package, but after clicking on [Register package] I
only get the following error:
502 Bad Gateway
nginx/1.6.2
Regards,
Elias
Bug report: https://github.com/dlang/dub/issues/1441
PR: https://github.com/dlang/dub-registry/
On Saturday, 7 April 2018 at 21:22:07 UTC, kdevel wrote:
Can the ternary conditional even be used to assign objects of
the wrong type?
[…]
Congratulations, I'm pretty sure you found an actual bug, even
though it doesn't have anything to do with the conditional
operator per se: https://issues
On Saturday, 7 April 2018 at 09:07:48 UTC, sdvcn wrote:
true?stt="AA":stt="BB";-///Out:BB
writeln(stt);
As I just pointed out in Ali's bug report [1], this is correct, as
true ? stt = "AA" : stt = "BB"
means
(true ? (stt = "AA") : stt) = "BB",
in accordan
Am 07.04.2018 um 23:57 schrieb Sönke Ludwig:
Am 07.04.2018 um 21:49 schrieb 0xEAB:
Hello :)
Tried to add a new package, but after clicking on [Register package] I
only get the following error:
502 Bad Gateway
nginx/1.6.2
Regards,
Elias
Bug report: https://github.com/dlang/dub/issues/1
On Friday, 6 April 2018 at 14:03:18 UTC, Abdulhaq wrote:
On Friday, 6 April 2018 at 13:10:07 UTC, jason wrote:
what is this?
It's a perl program that converts D code into APL
Here is a more readable version:
(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\]
\000-\031]+(?:(?:(?:\r\n)?[ \t]
)+|
33 matches
Mail list logo