D's Continous Changing

harakim harakim at gmail.com
Fri Mar 5 03:32:35 UTC 2021


> ```
> 	"toolchainRequirements": {
> 		"frontend": "==2.096"
> 	},
> ```

Thanks! I didn't know you could specify a toolchain version. I 
agree it would be cool if it automatically downloaded the correct 
version of compiler, but this will be helpful. Is it possible to 
download old versions of the compiler somewhere?

On Thursday, 4 March 2021 at 10:22:51 UTC, Bastiaan Veelo wrote:
> On Wednesday, 3 March 2021 at 23:30:20 UTC, harakim wrote:
>> Contrast to me trying to figure out how to format a number in 
>> binary. format!"%b"(number) does not work but is very similar 
>> to what is suggested in the documentation. I was able to 
>> figure out it's format("%b", number) but it took a few minutes.
>
> This works for me:
>  rdmd --eval="writeln(format!`%b`(5));"
>  101
>  rdmd --eval="writeln(__VERSION__);"
>  2096
>
> -- Bastiaan.

I want this almost every week at work. When I run into some 
trivial statement that I need to know for sure how it works, it's 
rarely worth it to create a whole new file and make a main method 
and all that. I just edit and run the entire program again, which 
is a waste of time.
So about ten seconds later:
PS> rdmd --eval="writeln(format!`%b`(5));"
~\AppData\Local\Temp\.rdmd\eval.F4ADE5F0F88B126B82870415B197BF60.d(18): Error: template argument expected following `!`
Failed: ["C:\\Program Files\\D\\dmd2\\windows\\bin\\dmd.exe", 
"-d", "-v", "-o-", 
"~\\AppData\\Local\\Temp\\.rdmd\\eval.F4ADE5F0F88B126B82870415B197BF60.d", "-I~\\AppData\\Local\\Temp\\.rdmd"]

PS> rdmd --eval="writeln(__VERSION__);"
2095

That was pretty sweet. However, it kind of goes to the point of 
my post. A one-revision difference means the documentation is not 
accurate for my compiler.

I'm not saying the language shouldn't evolve, I'm just saying it 
might make sense to keep compatibility changes to every 6 months 
or a year. Then you could keep the old documentation around for 
the old version, and create new documentation for the new version 
and no matter which version someone is using they would have 
documentation (within limits.)

Depending on how long I can keep at this project, I would be down 
to host my source wherever it needs to be hosted (provided it's 
git) to get the new-version-check feature. I might even pay a bit 
for it. I doubt that makes it worth it, but I thought I'd throw 
that out there in case more people agree.

I like D. I like that D is changing. To go along with that, I 
would like a little more predictability with major version 
releases. I see there is a lot more documentation than the last 
time I checked so I'll take a deeper look at that.


More information about the Digitalmars-d-learn mailing list