On Sun, Nov 25, 2018 at 09:53:50PM +, Stanislav Blinov via
Digitalmars-d-learn wrote:
> On Sunday, 25 November 2018 at 21:38:43 UTC, H. S. Teoh wrote:
>
> > Actually, I just thought of a way to do this with the existing language:
> > use a struct to simulate an enum:
> >
> > struct E {
>
On Sunday, 25 November 2018 at 21:38:43 UTC, H. S. Teoh wrote:
Actually, I just thought of a way to do this with the existing
language: use a struct to simulate an enum:
struct E {
alias Basetype = int;
Basetype impl;
alias impl this;
On Sun, Nov 25, 2018 at 07:22:54AM +, Stanislav Blinov via
Digitalmars-d-learn wrote:
> On Sunday, 25 November 2018 at 07:19:50 UTC, Stanislav Blinov wrote:
>
> > Granted, it may require some special syntax, i.e.
> >
> > enum E {
> > a,
> > b if version(Windows),
> > c if version
On Saturday, November 24, 2018 10:41:56 PM MST H. S. Teoh via Digitalmars-d-
learn wrote:
> On Sat, Nov 24, 2018 at 05:48:16PM +, Stanislav Blinov via
Digitalmars-d-learn wrote:
> > On Saturday, 24 November 2018 at 17:43:35 UTC, Jonathan M Davis wrote:
> > > I'm still inclined to think though
On Sunday, 25 November 2018 at 07:19:50 UTC, Stanislav Blinov
wrote:
Granted, it may require some special syntax, i.e.
enum E {
a,
b if version(Windows),
c if version(Windows),
d if version(Posix),
}
or something to that effect.
Come to think of it, since UDAs are now allowe
On Sunday, 25 November 2018 at 05:41:56 UTC, H. S. Teoh wrote:
On Sat, Nov 24, 2018 at 05:48:16PM +, Stanislav Blinov via
Digitalmars-d-learn wrote:
Yup. UDAs did get in there eventually, and version should too.
I think this would be a trivial DIP, by making it such that a
version block
On Sat, Nov 24, 2018 at 05:48:16PM +, Stanislav Blinov via
Digitalmars-d-learn wrote:
> On Saturday, 24 November 2018 at 17:43:35 UTC, Jonathan M Davis wrote:
> > On Saturday, November 24, 2018 9:28:47 AM MST Stanislav Blinov via
> > Digitalmars-d-learn wrote:
[...]
> > > enum Foo
> > > {
> >
On Sat, Nov 24, 2018 at 10:27:07PM +, Adam D. Ruppe via Digitalmars-d-learn
wrote:
[...]
> (Though a parsing thing: /// version(linux) void foo(); - is that doc
> on version linux or on void foo or on both? I guess it could only
> apply it in if there are {}... but eh I still don't love it.)
On Saturday, 24 November 2018 at 16:16:08 UTC, H. S. Teoh wrote:
Actually, what would be ideal is if each platform-specific
version of the symbol can have its own associated
platform-specific docs, in addition to the one common across
all platforms, and the doc system would automatically compil
On Saturday, 24 November 2018 at 17:43:35 UTC, Jonathan M Davis
wrote:
On Saturday, November 24, 2018 9:28:47 AM MST Stanislav Blinov
via Digitalmars-d-learn wrote:
On Saturday, 24 November 2018 at 07:00:31 UTC, Jonathan M Davis
wrote:
> [not legal]
>
> enum Foo
> {
>
> a,
> b,
> ve
On Saturday, November 24, 2018 9:28:47 AM MST Stanislav Blinov via
Digitalmars-d-learn wrote:
> On Saturday, 24 November 2018 at 07:00:31 UTC, Jonathan M Davis
>
> wrote:
> > [not legal]
> >
> > enum Foo
> > {
> >
> > a,
> > b,
> > version(linux) c = 42,
> > else version(Windows) c
On Saturday, 24 November 2018 at 07:00:31 UTC, Jonathan M Davis
wrote:
[not legal]
enum Foo
{
a,
b,
version(linux) c = 42,
else version(Windows) c = 54,
}
You're forced to version the entire enum.
Not in this case, no:
enum Foo
{
a,
b,
c = {
version(linux
On Fri, Nov 23, 2018 at 09:43:01PM -0700, Jonathan M Davis via
Digitalmars-d-learn wrote:
[...]
> Honestly, I would argue that if you have multiple versions of the
> documentation, then there's a serious problem. The documentation
> shouldn't be platform-dependent even if the symbols are. Even if
On Friday, November 23, 2018 11:22:24 PM MST Neia Neutuladh via Digitalmars-
d-learn wrote:
> On Fri, 23 Nov 2018 21:43:01 -0700, Jonathan M Davis wrote:
> > A solution like that might work reasonably well, but you still
> > have the problem of what to do when a symbol is documented in multiple
> >
On Fri, 23 Nov 2018 21:43:01 -0700, Jonathan M Davis wrote:
> A solution like that might work reasonably well, but you still
> have the problem of what to do when a symbol is documented in multiple
> version blocks, and having almost all the documentation in one version
> block and a few pieces of
On Friday, November 23, 2018 7:55:04 PM MST H. S. Teoh via Digitalmars-d-
learn wrote:
> Adam does have a very good point about showing all alternatives to docs,
> though. Arguably, that's what ddoc *should* do. If the programmer
> wrote a ddoc comment in the code, it probably should be processed
ild
is bad practice given how doing so defines a new version identifier that can
affect the build), it was decided that Phobos would stop using
version(D_Ddoc) as the language intended and instead use its own custom,
version identifier for the documentation - which is why we now have
version(StdDoc)
On Saturday, 24 November 2018 at 02:55:04 UTC, H. S. Teoh wrote:
But then that would be reinventing what Adam has already done,
right? :-D
Precisely, I already do all that. And people are even actually
using it!
On Sat, Nov 24, 2018 at 02:09:22AM +, Neia Neutuladh via
Digitalmars-d-learn wrote:
> On Fri, 23 Nov 2018 17:21:25 -0800, H. S. Teoh wrote:
> > Ddoc may have its stink points, but in this case, the stuff inside
> > version(Windows) blocks simply isn't compiled, so you can't expect
> > ddoc to
On Fri, 23 Nov 2018 17:21:25 -0800, H. S. Teoh wrote:
> Ddoc may have its stink points, but in this case, the stuff inside
> version(Windows) blocks simply isn't compiled, so you can't expect ddoc
> to do much about it. You can't just arbitrarily ddoc everything inside
> version blocks, because th
On Saturday, 24 November 2018 at 01:21:25 UTC, H. S. Teoh wrote:
Ddoc may have its stink points, but in this case, the stuff
inside version(Windows) blocks simply isn't compiled
That is why I call it "poorly designed" and a major reason why I
dropped it entirely and created my own doc generato
On Sat, Nov 24, 2018 at 12:51:36AM +, Adam D. Ruppe via Digitalmars-d-learn
wrote:
> On Friday, 23 November 2018 at 23:13:04 UTC, H. S. Teoh wrote:
> > There are a few cases where this is needed, e.g., to generate docs
> > for Windows-specific modules, since the website script is run on
> > Po
On Friday, 23 November 2018 at 23:13:04 UTC, H. S. Teoh wrote:
There are a few cases where this is needed, e.g., to generate
docs for Windows-specific modules, since the website script is
run on Posix and the Windows APIs would not be compiled at all,
leading to empty docs.
Note that that is
On Fri, Nov 23, 2018 at 09:53:59PM +, Adam D. Ruppe via Digitalmars-d-learn
wrote:
> On Friday, 23 November 2018 at 21:47:51 UTC, Tony wrote:
> > What is the situation in which the identifier StdDoc is set?
>
> When the phobos website is being compiled, its own makefile sets that.
>
> It is
On Friday, 23 November 2018 at 21:47:51 UTC, Tony wrote:
What is the situation in which the identifier StdDoc is set?
When the phobos website is being compiled, its own makefile sets
that.
It is basically a hack for website display.
In std.compiler there is this code:
/// Which vendor produced this compiler.
version(StdDdoc) Vendor vendor;
else version(DigitalMars) Vendor vendor = Vendor.digitalMars;
else version(GNU) Vendor vendor = Vendor.gnu;
else version(LDC) Vendor vendor = V
26 matches
Mail list logo