[Issue 18702] FAQ item "What does D have that C++ doesn't?" comparison link (https://dlang.org/articles/comparison.html) returns 404

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18702

Seb  changed:

   What|Removed |Added

   Hardware|x86 |All
 OS|Windows |All
   Severity|enhancement |major

--


[Issue 18702] FAQ item "What does D have that C++ doesn't?" comparison link (https://dlang.org/articles/comparison.html) returns 404

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18702

Seb  changed:

   What|Removed |Added

   Keywords||pull
 CC||greensunn...@gmail.com

--- Comment #1 from Seb  ---
https://github.com/dlang/dlang.org/pull/2323

--


[Issue 18703] Ddoc Backticks inside macro dont work.

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18703

Seb  changed:

   What|Removed |Added

 CC||greensunn...@gmail.com
   Hardware|x86_64  |All
 OS|Linux   |All

--- Comment #1 from Seb  ---
Yeah this should really work..
If you depend on this - `$(D_INLINECODE` might be a workaround:

https://run.dlang.io/is/A24qYc

or:

Macros:
  D = $1

--


[Issue 18703] New: Ddoc Backticks inside macro dont work.

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18703

  Issue ID: 18703
   Summary: Ddoc Backticks inside macro dont work.
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: var.spool.mail...@gmail.com

$(TEST)

MACROS:
TEST = `this should be highlighted as code`

generates:

`this should be highlighted as code`

but should generate:

this should be highlighted as code

--


[Issue 17607] not an associative array initializer

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17607

Seb  changed:

   What|Removed |Added

 CC||greensunn...@gmail.com

--- Comment #4 from Seb  ---
FYI: while it doesn't fix this bug, this PR is still very related this this
enhancement request:

https://github.com/dlang/dmd/pull/8051

--


[Issue 18702] FAQ item "What does D have that C++ doesn't?" comparison link (https://dlang.org/articles/comparison.html) returns 404

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18702

jonath...@gmail.com changed:

   What|Removed |Added

URL||https://dlang.org/articles/
   ||comparison.html

--


[Issue 18702] New: FAQ item "What does D have that C++ doesn't?" comparison link (https://dlang.org/articles/comparison.html) returns 404

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18702

  Issue ID: 18702
   Summary: FAQ item "What does D have that C++ doesn't?"
comparison link
(https://dlang.org/articles/comparison.html) returns
404
   Product: D
   Version: D2
  Hardware: x86
OS: Windows
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dlang.org
  Assignee: nob...@puremagic.com
  Reporter: jonath...@gmail.com

--


[Issue 18698] static foreach + __traits(allMembers, moduleName)

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18698

--- Comment #15 from Manu  ---
Okay, I must have had some workaround... I don't remember what exactly, it was
some years ago. I probably wrapped it in layers until it worked.
Regardless, it should work. My colleague just tried to do this and asked me why
it didn't work...
I have no recollection of workarounds I might have used.

--


[Issue 18698] static foreach + __traits(allMembers, moduleName)

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18698

Seb  changed:

   What|Removed |Added

 CC||greensunn...@gmail.com

--- Comment #14 from Seb  ---
Here's the regression tester with all 19 versions from 2.060 to 2.079:

https://run.dlang.io/is/ZBosCr

Anyhow, I think we all agree that Manu's use case should work, so let's focus
on fixing that (and avoid the off-topic discussion whether this may or may nor
have worked a long time ago).

--


[Issue 18698] static foreach + __traits(allMembers, moduleName)

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18698

--- Comment #13 from Ketmar Dark  ---
>Think D2.042
easy deal: http://downloads.dlang.org/releases/2010/

[pts/44:ketmar]:D/_old_dmd% ./dmd2/linux/bin/dmd
Digital Mars D Compiler v2.042
Copyright (c) 1999-2010 by Digital Mars written by Walter Bright

[pts/44:ketmar]:D/_old_dmd% ./dmd2/linux/bin/dmd -c test.d
test.d(2): Declaration expected, not 'foreach'
test.d(2): Declaration expected, not '__traits'
test.d(5): unrecognized declaration

exactly the same error with 2.039. should i go even further back in time? or,
fast-forward to 2.059: still the same thing. it. never. worked.

--


[Issue 18698] static foreach + __traits(allMembers, moduleName)

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18698

--- Comment #12 from Manu  ---
I'd love to paste code... But I wrote it in 2012 at a company I don't work at
anymore.
Think D2.042...

I'll see what I can do when I'm not in bed on a phone. But I have no idea what
now I can offer. I used to take function prototypes at top level, and mixin
their bodies at the same scope. My entire system was based on this.

They didn't fly me to dconf to talk about code that didn't compile.

--


[Issue 18698] static foreach + __traits(allMembers, moduleName)

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18698

--- Comment #11 from Ketmar Dark  ---
  module test;
  foreach(m; __traits(allMembers, test))
  {
pragma(msg, m);
  }

rdmd --force --compiler=ldc --eval="pragma(msg, __VERSION__);"
2073L

rdmd --force --compiler=ldc -c test.d
test.d(2): Error: declaration expected, not 'foreach'
test.d(2): Error: declaration expected, not '__traits'
test.d(5): Error: unrecognized declaration

2.073 is *way* before `static foreach`.

so please, code sample and compiler version. if it used to work, and now
doesn't, this is clearly a regression nobody noticed.

the same for old `foreach` code that doesn't work as it used to work before,
please.

--


[Issue 18698] static foreach + __traits(allMembers, moduleName)

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18698

--- Comment #10 from Manu  ---
Remove the 'static' from my OP and you have it.

It definitely worked. They flew me to dconf in 2013 and I gave a whole lecture
about it.
I don't work there anymore, so I don't have the code. I was starting to write a
new version.

Emitting an error instructing me to insert 'static' is at least once change in
old foreach.

--


[Issue 18698] static foreach + __traits(allMembers, moduleName)

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18698

--- Comment #9 from Ketmar Dark  ---
>Non-static foreach doesn't seem to be the same.
example, please. *nothing* was changed in old foreach.

>And it definitely worked at top level.
example, please. i have several different compiler versions at hand, starting
from 2.073 (WAY before static foreach), and top-level foreach doesn't work in
all of them. please, give example code and compiler version where it worked.
thank you.

--


[Issue 18698] static foreach + __traits(allMembers, moduleName)

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18698

--- Comment #8 from Manu  ---
Non-static foreach doesn't seem to be the same. There are new errors with old
usage of foreach instructing to use static foreach instead.

And it definitely worked at top level. I was using it to generate top level
binding stub functions almost as long as I've been using D.

It would be inside a mixin template mixed in at top level, that's all.

--


[Issue 18698] static foreach + __traits(allMembers, moduleName)

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18698

--- Comment #7 from Ketmar Dark  ---
`foreach` never worked at the top level. and non-static forach works *exactly*
the same as before. you are clearly has a very different compiler than the rest
of us.

--


[Issue 18698] static foreach + __traits(allMembers, moduleName)

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18698

--- Comment #6 from Manu  ---
I used 'foreach', which doesn't work anymore.
Since static foreach was added, the non-static one doesn't work the same.
static foreach should to all the static stuff that foreach used to do.

--


[Issue 18698] static foreach + __traits(allMembers, moduleName)

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18698

--- Comment #5 from Ketmar Dark  ---
[i]>I've been using this for almost 10 years[/i]
static foreach? so you really have a time machine, or a specially-crafted
compiler version you never gave others?! please, can you show us the 10 yo code
with `static foreach`, and the 10 yo old compiler you used to compile it?

this is normal thing for new language feature: some cases are missed. it will
eventually be fixed, and in the meantime you can write the code like us, mere
mortals did for those 10 years: without `static foreach`.

--


[Issue 18652] hashOf example doesn't compile

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18652

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 18652] hashOf example doesn't compile

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18652

--- Comment #2 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/druntime

https://github.com/dlang/druntime/commit/41eb363d75f38bace0a9a1f8e39bd5805cd98c61
Fix Issue 18652 - hashOf example doesn't compile

https://github.com/dlang/druntime/commit/11aecf478a6a23dca1cee27fad5dac052cb0e0ba
Merge pull request #2152 from WalterBright/fix18652

Issue 18652 - hashOf example doesn't compile

--


[Issue 18698] static foreach + __traits(allMembers, moduleName)

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18698

greenify  changed:

   What|Removed |Added

 CC||greeen...@gmail.com

--- Comment #4 from greenify  ---
Static foreach has been added in summer 2017 - how could you have been using
this for ten years?

(if this really is a regression, please describe it better so that everyone
understands it. Otherwise I think ketmar's assessment of this being an
oversight when static foreach was added.

--


[Issue 18698] static foreach + __traits(allMembers, moduleName)

2018-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18698

--- Comment #3 from Manu  ---
I barely understood a word of that post.
Point is, this used to work... I've been using this for almost 10 years to do a
bunch of codegen for stuff in module scope.

--