module search paths

Brian Tiffin btiffin at gnu.org
Wed Aug 4 19:55:06 UTC 2021


On Wednesday, 4 August 2021 at 09:41:45 UTC, Mathias LANG wrote:
> On Wednesday, 4 August 2021 at 04:51:48 UTC, Brian Tiffin wrote:
>> With `import std.json` working for the other symbols like 
>> parseJSON?
>>
>> `gdc-11 (Ubuntu 11.1.0-1ubuntu1~18.04.1) 11.1.0`
>>
>> Have good.
>
> You are using GDC 11, which has an older version of the 
> frontend.
> GDC is pretty great for targeting a variety of platform and 
> having a very stable compiler, but it comes with the downside 
> that it is updated less frequently (tied to GCC releases) and 
> the docs may get outdated.
>
> JSONType used to be named `JSON_TYPE`, and this was changed in 
> v2.082.0. I think GDC-11 is somewhere around v2.076.0 (with a 
> lot of backport for bugs, but no feature / Phobos backport). 
> Since v2.082.0 was released 2018-09-02 (almost 3 years ago), 
> the documentation has long moved.
>
> TL;DR: Use `JSON_TYPE`.
> Note that you can quickly get LDC / DMD setup with the install 
> script, or d-apt (https://d-apt.sourceforge.io/).

Thanks, Mathias.  So it's a trailing edge / leading edge thing.  
Ok with that.  I just got a workable install of DMD a few days 
ago, with 2.097.1.  Previous packages did not work on the old 
laptop I'm using to explore D.  Getting a workable DMD package 
was a boon too, adding dub and rdmd, which helps out a lot with 
other learning materials found on the web.

I'm not at the level where I build these tools from source yet.  
That's a few steps ahead.  And then the slow build of a mental 
knowledge base to know where and when to look for things that 
change or where articles may be ahead or behind in gdc D 
development details.

Being a GNU maintainer for a COBOL compiler, I was a GDC fanboy 
before I even tried it.  Willing to put up with a few edge cases 
while things build out and will always reach for gdc before 
trying the other 2 options.  ;-)

A life goal has been to see GnuCOBOL envelope all in it's path, 
via the C ABI.  gdc makes that easier with integrating all new 
things D with all the old things COBOL.  :-)

The last few weeks has seen a definite shift to D over C as a 
personal first choice for system and utility level programming, 
leading to a *lesser* shift to D over COBOL for application 
programming.

Learning more and more D makes it seems like it will be a first 
choice for most programming; low, mid and high level, in the 
small and in the large.  I may end up growing very spoiled in my 
old age.

Have good, make well.


More information about the Digitalmars-d-learn mailing list