Re: that is bug?

2018-04-07 Thread kdevel via Digitalmars-d
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

Re: that is bug?

2018-04-07 Thread kdevel via Digitalmars-d
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.

Re: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, [your code here]

2018-04-07 Thread kdevel via Digitalmars-d
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

Re: that is bug?

2018-04-07 Thread kdevel via Digitalmars-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=&qu

Re: that is bug?

2018-04-07 Thread kdevel via Digitalmars-d
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 *

Re: that is bug?

2018-04-07 Thread kdevel via Digitalmars-d
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

Re: that is bug?

2018-04-08 Thread kdevel via Digitalmars-d
On Sunday, 8 April 2018 at 07:22:19 UTC, Patrick Schluter wrote: You may find an in-depth discussion of the C++ case in https://stackoverflow.com/questions/7499400/ternary-conditional-and-assignment-operator-precedence My formulation was ambiguous, it is the same precedence as the link says.

Re: Is it a bug that a parent class that access its own private members from derived classes gets deprecation warning?

2018-04-08 Thread kdevel via Digitalmars-d
On Sunday, 8 April 2018 at 13:00:02 UTC, bauss wrote: [...] // a.d module a; class Foo { private: bool _baz; public: void handleBar(T : Foo)(T[] foos) { foreach (child; foos) { child._baz =

Re: Why Physicists Still Use Fortran

2017-10-17 Thread kdevel via Digitalmars-d
On Monday, 16 October 2017 at 09:06:01 UTC, qznc wrote: Dijkstra made a good argument for zero-based: https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html Donald Knuth on that proposal ;-) Edsger Dijkstra's Retirement Banquet - Part 8 of 13 https://www.youtube.com/watch?v=6gH

SPF record for forum.dlang.org

2018-02-21 Thread kdevel via Digitalmars-d
Today I received a notification *e-mail* after somebody has replied to a post: https://forum.dlang.org/thread/jiefcxwqbjzqnmtaz...@forum.dlang.org#post-sksbiiwnfsxocklwcfsd:40forum.dlang.org I would greatly appreciate if the zone admin of dlang.org adds an SPF record also to forum.dlang.org.

Re: SPF record for forum.dlang.org

2018-02-21 Thread kdevel via Digitalmars-d
Vladimir! On Wednesday, 21 February 2018 at 23:21:05 UTC, Vladimir Panteleev wrote: On Wednesday, 21 February 2018 at 21:57:59 UTC, kdevel wrote: I would greatly appreciate if the zone admin of dlang.org adds an SPF record also to forum.dlang.org. Hi, SPF/DKIM/DMARC are good ideas in gener

Re: Slow code, slow

2018-02-23 Thread kdevel via Digitalmars-d
On Friday, 23 February 2018 at 20:15:12 UTC, H. S. Teoh wrote: Now that I got your attention: https://issues.dlang.org/show_bug.cgi?id=18511 Your bug report is about slowdown in *compilation* time. I wondered if the longer compilation time is due to the better (faster) generated code

Re: Postgres and other database interfaces

2018-02-25 Thread kdevel via Digitalmars-d
On Sunday, 25 February 2018 at 11:46:26 UTC, Denis F wrote: But it is impossible to convert text :names or '?' into Postgres's "$1": Postgres isn't knows fields names at start of a query processing and you can't replace '?' to "$" by simple 'replace' call - it will need full syntax parsing of

Re: Annoying module name / typename conflict

2017-07-16 Thread kdevel via Digitalmars-d
On Monday, 2 April 2012 at 22:20:13 UTC, bearophile wrote: For DMD choosing one or the other is arbitrary. It's a defect of the way the D module system is designed. Ran into that problem with a Module S containing module S; import std.stdio; struct S { this (string s) {