Re: Refactoring tools

2021-02-02 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 3 February 2021 at 07:20:06 UTC, Imperatorn wrote: As the title says: 1. Are there any (automated) refactoring tools for D? I believe there's some limited functionality in one or more of the IDE plugins, but I'm not aware of anything full-featured or independent. 2. If not,

Refactoring tools

2021-02-02 Thread Imperatorn via Digitalmars-d-learn
As the title says: 1. Are there any (automated) refactoring tools for D? 2. If not, why? (Is D still too small?)

Can change vtbl record at runtime ?

2021-02-02 Thread Виталий Фадеев via Digitalmars-d-learn
Reason: Reuse component, bind custom callback without creating new class. Concept example: class SaveFilePopup { void onSuccess() { /* default operations */ } } auto saveFile = new SaveFilePopup(); saveFile.onSuccess = { /* New operations */ } Delegate:

Re: How can I stop D from dropping decimals in strings

2021-02-02 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 2 February 2021 at 23:10:50 UTC, Steven Schveighoffer wrote: On 2/2/21 5:27 PM, Tim wrote: Hi all, I have to serialize an array like [0.0, 0.0, 0.0] to a Json object. During this process, the serializer creates a string of the array, but it creates "[0, 0, 0]", dropping the

Re: How can I stop D from dropping decimals in strings

2021-02-02 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/2/21 5:27 PM, Tim wrote: Hi all, I have to serialize an array like [0.0, 0.0, 0.0] to a Json object. During this process, the serializer creates a string of the array, but it creates "[0, 0, 0]", dropping the decimal. How can I stop this? It totally depends on the library. As Adam

Re: What is the difference between static linking with .a and .so libphobos?

2021-02-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 2 February 2021 at 22:39:40 UTC, WhatMeWorry wrote: Don't we want to Dynamically link with shared libphobos2.so? Yeah, I imagine what they meant was statically binding to the dynamic link library as opposed to loading certain procedures at runtime one by one. With the .a file,

Re: How can I stop D from dropping decimals in strings

2021-02-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 2 February 2021 at 22:27:53 UTC, Tim wrote: I have to serialize an array like [0.0, 0.0, 0.0] to a Json object. During this process, the serializer creates a string of the array, but it creates "[0, 0, 0]", dropping the decimal. How can I stop this? This depends on the library

What is the difference between static linking with .a and .so libphobos?

2021-02-02 Thread WhatMeWorry via Digitalmars-d-learn
I'm studying the D article at: https://dlang.org/articles/dll-linux.html#dso5 https://dlang.org/articles/dll-linux.html#dso6 Statically Linking D Program With libphobos2.a Statically Linking D Program With libphobos2.so Don't we want to Dynamically link with shared libphobos2.so? Also why

How can I stop D from dropping decimals in strings

2021-02-02 Thread Tim via Digitalmars-d-learn
Hi all, I have to serialize an array like [0.0, 0.0, 0.0] to a Json object. During this process, the serializer creates a string of the array, but it creates "[0, 0, 0]", dropping the decimal. How can I stop this?