Re: Dependency injection pattern

2018-05-13 Thread Jesse Phillips via Digitalmars-d-learn
On Sunday, 13 May 2018 at 07:42:10 UTC, Suliman wrote: Could anybody give small example of Dependency injection pattern? I googled about it, but found only C# examples and I am not quite sure how to use them. Also I would like get some explanation/comments for code. Here is a quick example o

Re: Why The D Style constants are written in camelCase?

2018-05-13 Thread Q. Schroll via Digitalmars-d-learn
On Wednesday, 9 May 2018 at 09:38:14 UTC, BoQsc wrote: The D Style suggest to camelCase constants, while Java naming conventions always promoted uppercase letter. Is there an explanation why D Style chose to use camelCase instead of all UPPERCASE for constants, was there any technical problem

Re: Deserialize json on runtime type with vibed

2018-05-13 Thread Stefan Koch via Digitalmars-d-learn
On Saturday, 12 May 2018 at 20:23:27 UTC, boolangery wrote: Hi, I want to do something like that: The user first register some type associated to a string and a callback registerHandler!Foo("foo", (res) { info("message received"); }); I want the callback to be called when a json packet c

Dependency injection pattern

2018-05-13 Thread Suliman via Digitalmars-d-learn
Could anybody give small example of Dependency injection pattern? I googled about it, but found only C# examples and I am not quite sure how to use them. Also I would like get some explanation/comments for code.