Re: Maybe D is right about GC after all !

2017-12-25 Thread Mark via Digitalmars-d
On Tuesday, 26 December 2017 at 07:01:16 UTC, codephantom wrote: On Tuesday, 26 December 2017 at 04:47:35 UTC, Walter Bright wrote: Only if someone considers this as fixed: int foo(int* p) { return p[1]; } int bar(int i) { return foo(); } clang++ -c test.cpp -Wall good

Re: Maybe D is right about GC after all !

2017-12-25 Thread codephantom via Digitalmars-d
On Tuesday, 26 December 2017 at 04:47:35 UTC, Walter Bright wrote: Only if someone considers this as fixed: int foo(int* p) { return p[1]; } int bar(int i) { return foo(); } clang++ -c test.cpp -Wall good example..and it makes a good point. however, let that point be not that

Re: OT: red-lang doing fundraising via DAO

2017-12-25 Thread Joakim via Digitalmars-d
On Monday, 25 December 2017 at 19:41:49 UTC, yawniek wrote: interesting idea: http://www.red-lang.org/2017/12/leaping-into-future-red-goes-blockchain.html Yes, interesting approach. Decentralized development has taken over, as the most-deployed OS on the planet, Android, is developed by a

Re: Maybe D is right about GC after all !

2017-12-25 Thread Walter Bright via Digitalmars-d
On 12/24/2017 9:13 AM, Laeeth Isharc wrote: New things grow at the fringes.  See the work of Clayton Christensen and his book the Innovator's Dilemma.  A head-on assault is ill-advised.  People looking for salvation are easier to talk to than those who don't see anything wrong with what

Re: Maybe D is right about GC after all !

2017-12-25 Thread Walter Bright via Digitalmars-d
On 12/24/2017 8:51 AM, Patrick Schluter wrote: I ported 1 app from Java to D. It was so unspectacular (or better said it was spectacularly easy) that you're probably right. Reaching to Java devs is a good idea. The advantage of Java though, is not the language but the huge, huge, huge existing

Re: Maybe D is right about GC after all !

2017-12-25 Thread Walter Bright via Digitalmars-d
On 12/24/2017 7:00 AM, Dylan Graham wrote: I also recall someone saying that C++'s memory problem is fixed. D's MMM seems infantile in comparison. Only if someone considers this as fixed: int foo(int* p) { return p[1]; } int bar(int i) { return foo(); } clang++ -c test.cpp -Wall

[Issue 18115] [REG2.078-b1] case where && is not shortcut anymore in CTFE

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18115 --- Comment #1 from Basile B. --- The '&&' RHS shouldn't be evaluated even in this simplified test case: ``` int test() { if (test.stringof.length >= 6 && test.stringof[$-7..$] == "1234567") {} return 0; } enum a

[Issue 18128] [scope] escaping reference to class allocated on the stack

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18128 Mike Franklin changed: What|Removed |Added CC||slavo5...@yahoo.com --

Re: Article: Finding memory bugs in D code with AddressSanitizer

2017-12-25 Thread Walter Bright via Digitalmars-d-announce
On 12/25/2017 3:17 PM, Johan Engelen wrote: On Monday, 25 December 2017 at 20:31:18 UTC, Walter Bright wrote: Thanks for the great article! Some suggestions: Thanks for your comments, I've incorporated them (to my liking). 1. The gray-on-white text is not very legible. Looks great here,

Re: Please do not use 'auto' return types without thoroughly describing the interface

2017-12-25 Thread Neia Neutuladh via Digitalmars-d
On Monday, 25 December 2017 at 22:48:39 UTC, H. S. Teoh wrote: The exact type does not and should not need to be known by user code. It's a public type reported by some of the documentation but not other parts. Its capabilities are given vaguely in the docs for the functions that return it.

Re: Article: Finding memory bugs in D code with AddressSanitizer

2017-12-25 Thread Ali Çehreli via Digitalmars-d-announce
On 12/25/2017 09:03 AM, Johan Engelen wrote: Thanks for your proof-reading. - (or ASan for short) That came a little late in the article because ASan already appeared in the introduction. - peak your interest -> pique your interest - Cppcon -> CppCon - an ulong -> a ulong (That's

Can I use memoize with a non-static struct method?

2017-12-25 Thread Marc via Digitalmars-d-learn
something like this: struct S { // variables... string doGen(int n) { return ""; } alias gen = memoize!doGen; } The error I got is: Error: need 'this' for 'doGen' of type 'string(int n)' I can't make doGen static because it access non-static struct members... can I workaround this?

[Issue 18124] Over-use of `auto` return type in std.regex

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18124 --- Comment #3 from Seb --- > I wasn't aware that a decision to use the type system was bikeshedding. Okay let me go one step back here: I do see your point of explicitly stating the return type, s.t. it's one click away

Re: Article: Finding memory bugs in D code with AddressSanitizer

2017-12-25 Thread Ali Çehreli via Digitalmars-d-announce
On 12/25/2017 03:17 PM, Johan Engelen wrote: >> 1. The gray-on-white text is not very legible. > > Looks great here, I like it, sorry. (made it completely black now, can't > see the difference here though) Yes, browsers report it to be black but it looks very gray :) on Linux Mint with both

Re: What is 'scope' in function parameter?

2017-12-25 Thread Mike Franklin via Digitalmars-d-learn
On Monday, 25 December 2017 at 10:42:55 UTC, Sobaya wrote: ``` import std.stdio; int[] x; void func(scope int[] a) { x = a; } void main() { func([0,1,2]); writeln(x); } ``` This code was successfully compiled and printed '[0, 1, 2]'. But according to

Re: Article: Finding memory bugs in D code with AddressSanitizer

2017-12-25 Thread Johan Engelen via Digitalmars-d-announce
On Monday, 25 December 2017 at 20:31:18 UTC, Walter Bright wrote: Thanks for the great article! Some suggestions: Thanks for your comments, I've incorporated them (to my liking). 1. The gray-on-white text is not very legible. Looks great here, I like it, sorry. (made it completely black

Re: Tail-constness of class parameters

2017-12-25 Thread Nordlöw via Digitalmars-d-learn
On Monday, 25 December 2017 at 15:16:55 UTC, ag0aep6g wrote: https://dlang.org/phobos/std_typecons.html#Rebindable Thanks.

Re: partial application for templates

2017-12-25 Thread David Nadlinger via Digitalmars-d-learn
On Monday, 25 December 2017 at 20:39:52 UTC, Mengu wrote: is partially applying templates possible? Check out std.meta.Apply{Left, Right}. — David

Re: Please do not use 'auto' return types without thoroughly describing the interface

2017-12-25 Thread H. S. Teoh via Digitalmars-d
On Mon, Dec 25, 2017 at 04:26:52PM +, Piotr Klos via Digitalmars-d wrote: > On Monday, 25 December 2017 at 03:23:33 UTC, Neia Neutuladh wrote: > > If you have a function with a return type listed as `auto`, please > > thoroughly describe what interface the return value provides. > > > > I

Re: Converting array in to aliased tuple type.

2017-12-25 Thread visitor via Digitalmars-d-learn
On Monday, 25 December 2017 at 21:35:18 UTC, visitor wrote: On Monday, 25 December 2017 at 21:11:08 UTC, aliak wrote: On Monday, 25 December 2017 at 17:59:54 UTC, visitor wrote: On Monday, 25 December 2017 at 15:03:08 UTC, aliak wrote: On Monday, 25 December 2017 at 14:08:08 UTC, Mengu wrote:

Re: Converting array in to aliased tuple type.

2017-12-25 Thread visitor via Digitalmars-d-learn
On Monday, 25 December 2017 at 21:11:08 UTC, aliak wrote: On Monday, 25 December 2017 at 17:59:54 UTC, visitor wrote: On Monday, 25 December 2017 at 15:03:08 UTC, aliak wrote: On Monday, 25 December 2017 at 14:08:08 UTC, Mengu wrote: I was kind of hoping for some magical D variadic alias

Re: Converting array in to aliased tuple type.

2017-12-25 Thread visitor via Digitalmars-d-learn
On Monday, 25 December 2017 at 17:59:54 UTC, visitor wrote: On Monday, 25 December 2017 at 15:03:08 UTC, aliak wrote: On Monday, 25 December 2017 at 14:08:08 UTC, Mengu wrote: I was kind of hoping for some magical D variadic alias template on Tuple or something that will just deconstruct the

Re: Converting array in to aliased tuple type.

2017-12-25 Thread aliak via Digitalmars-d-learn
On Monday, 25 December 2017 at 17:59:54 UTC, visitor wrote: On Monday, 25 December 2017 at 15:03:08 UTC, aliak wrote: On Monday, 25 December 2017 at 14:08:08 UTC, Mengu wrote: I was kind of hoping for some magical D variadic alias template on Tuple or something that will just deconstruct the

Re: partial application for templates

2017-12-25 Thread MrSmith via Digitalmars-d-learn
On Monday, 25 December 2017 at 20:39:52 UTC, Mengu wrote: is partially applying templates possible? template A(X, Y, Z) {} alias B(X, Y) = A!(X, Y, int);

Re: D as a betterC a game changer ?

2017-12-25 Thread Walter Bright via Digitalmars-d
On 12/25/2017 1:25 AM, Dan Partelly wrote: 1. Exceptions can be done "you do not use it, you do not pay for them". Also, compiler switches to diable exceptions totally exist in most compilers. Those switches exist because it is not free. 3. In several extensive C programs I seen, expception

partial application for templates

2017-12-25 Thread Mengu via Digitalmars-d-learn
is partially applying templates possible?

Re: Article: Finding memory bugs in D code with AddressSanitizer

2017-12-25 Thread Walter Bright via Digitalmars-d-announce
On 12/25/2017 9:03 AM, Johan Engelen wrote: I've been writing this article since August, and finally found some time to finish it: http://johanengelen.github.io/ldc/2017/12/25/LDC-and-AddressSanitizer.html "LDC comes with improved support for Address Sanitizer since the 1.4.0 release.

Curiously Recurring Template Pattern Example

2017-12-25 Thread helxi via Digitalmars-d-learn
Hi, Is there any blogs that discuss CRTP, or even Policy based/introspection based design in idiomatic D? I would love to see the strategies used to tackle the overhead involving dynamic dispatch by emulating static polymorphism. Thanks.

[Issue 18128] New: [scope] escaping reference to class allocated on the stack

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18128 Issue ID: 18128 Summary: [scope] escaping reference to class allocated on the stack Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 18128] [scope] escaping reference to class allocated on the stack

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18128 Walter Bright changed: What|Removed |Added Keywords||safe --

Re: DMD Windows 64bit target - how to setup the environment?

2017-12-25 Thread Andre Pany via Digitalmars-d-learn
On Monday, 25 December 2017 at 10:57:46 UTC, realhet wrote: Hello, I'm very well satisfied with the DMD 32bit compiler and the OptLink linker on Windows. I even made an incremental builder to it, and I can see the running program in 1 second. Lately I sadly noticed, that the OptLink works

OT: red-lang doing fundraising via DAO

2017-12-25 Thread yawniek via Digitalmars-d
interesting idea: http://www.red-lang.org/2017/12/leaping-into-future-red-goes-blockchain.html

Re: DMD Windows 64bit target - how to setup the environment?

2017-12-25 Thread Benjamin Thaut via Digitalmars-d-learn
On Monday, 25 December 2017 at 16:35:26 UTC, realhet wrote: Now I have my first DMD 64bit windows console app running. (And I'm already afraid of the upcoming windowed application haha) My recommendation for getting setup on Windows with D is as follows: 1) Install the latest visual studio

Re: Define enum value at compile time via compiler argument?

2017-12-25 Thread Thomas Mader via Digitalmars-d-learn
On Monday, 25 December 2017 at 17:46:05 UTC, aliak wrote: On Monday, 25 December 2017 at 16:38:32 UTC, Thomas Mader wrote: On Monday, 25 December 2017 at 16:22:11 UTC, Mengu wrote: is it a relative path? if so: pragma(msg, __FILE_FULL_PATH__.split("/")[0..$-1].join("/"));

Re: Converting array in to aliased tuple type.

2017-12-25 Thread visitor via Digitalmars-d-learn
On Monday, 25 December 2017 at 15:03:08 UTC, aliak wrote: On Monday, 25 December 2017 at 14:08:08 UTC, Mengu wrote: I was kind of hoping for some magical D variadic alias template on Tuple or something that will just deconstruct the arguments in to tuple components. i don't think it's

[Issue 15592] Template specializations don't work in nested scope

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15592 Bastiaan Veelo changed: What|Removed |Added CC||basti...@veelo.net --

Re: Define enum value at compile time via compiler argument?

2017-12-25 Thread aliak via Digitalmars-d-learn
On Monday, 25 December 2017 at 16:38:32 UTC, Thomas Mader wrote: On Monday, 25 December 2017 at 16:22:11 UTC, Mengu wrote: is it a relative path? if so: pragma(msg, __FILE_FULL_PATH__.split("/")[0..$-1].join("/")); https://run.dlang.io/is/gRUAD6 Nice idea but it is an absolute path.

[Issue 18124] Over-use of `auto` return type in std.regex

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18124 --- Comment #2 from Neia Neutuladh --- I wasn't aware that a decision to use the type system was bikeshedding. Just a tip: emoticons can make an otherwise professional comment seem smarmy or condescending. If you do not intend

[Issue 18127] homepage: Fast code, fast.

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18127 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

Article: Finding memory bugs in D code with AddressSanitizer

2017-12-25 Thread Johan Engelen via Digitalmars-d-announce
I've been writing this article since August, and finally found some time to finish it: http://johanengelen.github.io/ldc/2017/12/25/LDC-and-AddressSanitizer.html "LDC comes with improved support for Address Sanitizer since the 1.4.0 release. Address Sanitizer (ASan) is a runtime memory

[Issue 18124] Over-use of `auto` return type in std.regex

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18124 Seb changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: DMD Windows 64bit target - how to setup the environment?

2017-12-25 Thread realhet via Digitalmars-d-learn
Now I have my first DMD 64bit windows console app running. (And I'm already afraid of the upcoming windowed application haha) After further fiddling I installed the >>>Visual Cpp tools 2015<<< package that contains a linker with x64 stuff in it (along with several GB of bloatware). contents

Re: Define enum value at compile time via compiler argument?

2017-12-25 Thread Thomas Mader via Digitalmars-d-learn
On Monday, 25 December 2017 at 16:22:11 UTC, Mengu wrote: is it a relative path? if so: pragma(msg, __FILE_FULL_PATH__.split("/")[0..$-1].join("/")); https://run.dlang.io/is/gRUAD6 Nice idea but it is an absolute path. :-/

[Issue 18127] New: homepage: Fast code, fast.

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18127 Issue ID: 18127 Summary: homepage: Fast code, fast. Product: D Version: D2 Hardware: All URL: http://dlang.org/ OS: All Status: NEW Severity:

Re: Please do not use 'auto' return types without thoroughly describing the interface

2017-12-25 Thread Piotr Klos via Digitalmars-d
On Monday, 25 December 2017 at 03:23:33 UTC, Neia Neutuladh wrote: If you have a function with a return type listed as `auto`, please thoroughly describe what interface the return value provides. I would just like to say that I strongly agree. Lack of documentation of template parameters

Re: Define enum value at compile time via compiler argument?

2017-12-25 Thread Mengu via Digitalmars-d-learn
On Monday, 25 December 2017 at 16:13:48 UTC, Thomas Mader wrote: Hello, I would like to set the path to a directory at compile time but it doesn't seem to be possible yet. I tried it with a -version=CustomPath argument and inside the version statement in the code I tried to read the value

Define enum value at compile time via compiler argument?

2017-12-25 Thread Thomas Mader via Digitalmars-d-learn
Hello, I would like to set the path to a directory at compile time but it doesn't seem to be possible yet. I tried it with a -version=CustomPath argument and inside the version statement in the code I tried to read the value from the environment. Sadly this doesn't work because getenv can

Re: Tail-constness of class parameters

2017-12-25 Thread ag0aep6g via Digitalmars-d-learn
On Monday, 25 December 2017 at 14:49:11 UTC, Nordlöw wrote: 1. Is there a way to express tail-constness on the parameters https://dlang.org/phobos/std_typecons.html#Rebindable

Re: Converting array in to aliased tuple type.

2017-12-25 Thread aliak via Digitalmars-d-learn
On Monday, 25 December 2017 at 14:08:08 UTC, Mengu wrote: since Point is a Tuple and does not have a constructor that takes a list of integers (int[]), you should have a helper function. Aukay :( I was kind of hoping for some magical D variadic alias template on Tuple or something that

Re: Does to!(string)(char[]) do any memory allocation on conversion?

2017-12-25 Thread aliak via Digitalmars-d-learn
On Monday, 25 December 2017 at 14:12:32 UTC, Marc wrote: Does to!(string)(char[]) do any memory allocation on conversion or is this similar to a cast or what else? As said it calls idup, which calls _trustedDup which seems to call _dup which does memory allocation ->

Tail-constness of class parameters

2017-12-25 Thread Nordlöw via Digitalmars-d-learn
In a graph library I'm working on I have the following algorithm bool hasContext(Node sub,// TODO in Node sup) nothrow // TODO in { Node curr = sub; while (true) { Node ctx = curr.context; if (!ctx) { break;} if (ctx is sup)

Re: Does to!(string)(char[]) do any memory allocation on conversion?

2017-12-25 Thread Temtaime via Digitalmars-d-learn
On Monday, 25 December 2017 at 14:37:01 UTC, Mengu wrote: On Monday, 25 December 2017 at 14:12:32 UTC, Marc wrote: Does to!(string)(char[]) do any memory allocation on conversion or is this similar to a cast or what else? yes, it is allocating memory. you can test such cases with @nogc [0].

Re: Does to!(string)(char[]) do any memory allocation on conversion?

2017-12-25 Thread Mengu via Digitalmars-d-learn
On Monday, 25 December 2017 at 14:12:32 UTC, Marc wrote: Does to!(string)(char[]) do any memory allocation on conversion or is this similar to a cast or what else? yes, it is allocating memory. you can test such cases with @nogc [0]. you can get a char[] via .dup of a string and then you

Re: Does to!(string)(char[]) do any memory allocation on conversion?

2017-12-25 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 25 December 2017 at 14:37:01 UTC, Mengu wrote: yes, it is allocating memory. you can test such cases with @nogc [0]. nogc is really conservative and thus gives a lot of false positives. I'd just compare instr.ptr is outstr.ptr here and see if it changes (it will tho)

Re: Does to!(string)(char[]) do any memory allocation on conversion?

2017-12-25 Thread Temtaime via Digitalmars-d-learn
On Monday, 25 December 2017 at 14:12:32 UTC, Marc wrote: Does to!(string)(char[]) do any memory allocation on conversion or is this similar to a cast or what else? It is translated to idup. So yes, it allocates memory.

Does to!(string)(char[]) do any memory allocation on conversion?

2017-12-25 Thread Marc via Digitalmars-d-learn
Does to!(string)(char[]) do any memory allocation on conversion or is this similar to a cast or what else?

Re: Converting array in to aliased tuple type.

2017-12-25 Thread Mengu via Digitalmars-d-learn
On Monday, 25 December 2017 at 12:03:32 UTC, aliak wrote: Hi, been looking for a way to convert an array to a tuple, but can't seem to find one. Is there one? Looking for something like: alias Point = Tuple!(int, "x", int, "y"); enum data = "1,2:8,9"; auto points = data .split(':')

Re: D as a betterC a game changer ?

2017-12-25 Thread Seb via Digitalmars-d
On Monday, 25 December 2017 at 09:25:46 UTC, Dan Partelly wrote: On Sunday, 24 December 2017 at 22:33:38 UTC, Walter Bright wrote: Most of Phobos is actually workable with betterC, it's just that nobody had gone through >>and figured out what is. Could you "fix" Phobos so it works out of

Re: What is 'scope' in function parameter?

2017-12-25 Thread Mike Franklin via Digitalmars-d-learn
On Monday, 25 December 2017 at 11:09:25 UTC, Jonathan M Davis wrote: ``` import std.stdio; int[] x; void func(scope int[] a) { x = a; } void main() { func([0,1,2]); writeln(x); } ``` This code was successfully compiled and printed '[0, 1, 2]'. But according to

Re: D as a betterC a game changer ?

2017-12-25 Thread Jonathan M Davis via Digitalmars-d
On Monday, December 25, 2017 11:18:58 Joakim via Digitalmars-d wrote: > To clarify Mike's point, the dmd backend was taken from the > existing dmc C/C++ compiler, which started in the '80s. It > wasn't written in D because D didn't exist back then! The > backend could be turned into normal GC'ed

Converting array in to aliased tuple type.

2017-12-25 Thread aliak via Digitalmars-d-learn
Hi, been looking for a way to convert an array to a tuple, but can't seem to find one. Is there one? Looking for something like: alias Point = Tuple!(int, "x", int, "y"); enum data = "1,2:8,9"; auto points = data .split(':') .map!(a => a .split(',') .map!(to!int) ) .map!Point;

[Issue 18126] [internal] Reduce number of turned off warnings.

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18126 Iain Buclaw changed: What|Removed |Added Keywords||C++

[Issue 18126] New: [internal] Reduce number of turned off warnings.

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18126 Issue ID: 18126 Summary: [internal] Reduce number of turned off warnings. Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: D as a betterC a game changer ?

2017-12-25 Thread Joakim via Digitalmars-d
On Monday, 25 December 2017 at 10:40:09 UTC, Mike Parker wrote: On Monday, 25 December 2017 at 10:06:31 UTC, Mike Franklin wrote: On Sunday, 24 December 2017 at 10:11:37 UTC, Dan Partelly wrote: D as betterC really is a game changer, for anyone who cares to give it a try. Yes, it really

Re: What is 'scope' in function parameter?

2017-12-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, December 25, 2017 10:42:55 Sobaya via Digitalmars-d-learn wrote: > What means 'scope' in function parameter? > > I made a test code. > > ``` > import std.stdio; > > int[] x; > > void func(scope int[] a) { > x = a; > } > > void main() { > func([0,1,2]); > writeln(x); > } >

Re: nested module problem

2017-12-25 Thread Jean-Louis Leroy via Digitalmars-d-learn
On Sunday, 24 December 2017 at 22:17:23 UTC, Luís Marques wrote: On Saturday, 2 September 2017 at 20:03:48 UTC, Jean-Louis Leroy wrote: jll@ORAC:~/dev/d/tests/modules$ tree . ├── foo │ └── bar.d └── foo.d I think that shouldn't be allowed. You have a package foo, but use a normal module

DMD Windows 64bit target - how to setup the environment?

2017-12-25 Thread realhet via Digitalmars-d-learn
Hello, I'm very well satisfied with the DMD 32bit compiler and the OptLink linker on Windows. I even made an incremental builder to it, and I can see the running program in 1 second. Lately I sadly noticed, that the OptLink works only for 32bit target, and I need to go to 64bit if I want to

Re: Multiple inheritance D entry on rosettacode.org

2017-12-25 Thread Jean-Louis Leroy via Digitalmars-d
On Thursday, 21 December 2017 at 04:15:14 UTC, user1234 wrote: Do you refer to static inheritance using multiple alias this ? If so, maybe you don't know yet that this feature is not implemented for now. Yes. I didn't realize it was still science fiction ;-) Ah, good think I passed the baton

[Issue 18120] Allow DRT options to be set via the environment

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18120 Rainer Schuetze changed: What|Removed |Added CC||r.sagita...@gmx.de

What is 'scope' in function parameter?

2017-12-25 Thread Sobaya via Digitalmars-d-learn
What means 'scope' in function parameter? I made a test code. ``` import std.stdio; int[] x; void func(scope int[] a) { x = a; } void main() { func([0,1,2]); writeln(x); } ``` This code was successfully compiled and printed '[0, 1, 2]'. But according to

Re: D as a betterC a game changer ?

2017-12-25 Thread Mike Parker via Digitalmars-d
On Monday, 25 December 2017 at 10:06:31 UTC, Mike Franklin wrote: On Sunday, 24 December 2017 at 10:11:37 UTC, Dan Partelly wrote: D as betterC really is a game changer, for anyone who cares to give it a try. Yes, it really is. The fact that -betterC exists is a glaring admission that D

Re: D as a betterC a game changer ?

2017-12-25 Thread Mike Franklin via Digitalmars-d
On Monday, 25 December 2017 at 09:25:46 UTC, Dan Partelly wrote: 2. Expceptions can be implemented in such a way that the run-time cost, when used ,is minimal. I did some testing a few years ago with g++ and the ARM Cortex-M platform. I found that, compared with checking return values,

Re: Maybe D is right about GC after all !

2017-12-25 Thread Russel Winder via Digitalmars-d
On Mon, 2017-12-25 at 08:12 +, Dan Partelly via Digitalmars-d wrote: > […] > It starts with "everything must be a class". An die hard OOP > language with little support for anything else. And to put it in > the words of the great Alex Stepanov: > > > Yes. STL is not object oriented. I

Re: Maybe D is right about GC after all !

2017-12-25 Thread Russel Winder via Digitalmars-d
On Sun, 2017-12-24 at 22:04 +, Dan Partelly via Digitalmars-d wrote: > […] > > 1995. A dark year. Two of the crappiest language ever devised by > man arrived. Both gained traction. Java, through marketing. PhP > though tribalism. I thought 1995 was a good year (*). I have no idea about

Re: D as a betterC a game changer ?

2017-12-25 Thread Mike Franklin via Digitalmars-d
On Sunday, 24 December 2017 at 10:11:37 UTC, Dan Partelly wrote: D as betterC really is a game changer, for anyone who cares to give it a try. Yes, it really is. The fact that -betterC exists is a glaring admission that D "got it wrong". -betterC was an idea that I heard Walter propose a

Re: D as a betterC a game changer ?

2017-12-25 Thread Dan Partelly via Digitalmars-d
On Sunday, 24 December 2017 at 22:33:38 UTC, Walter Bright wrote: Most of Phobos is actually workable with betterC, it's just that nobody had gone through >>and figured out what is. Could you "fix" Phobos so it works out of the box regardless with no GC runtime ? Or at least properly label

[Issue 17985] Implement -stdin for rdmd

2017-12-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17985 --- Comment #4 from Andre --- It's great dmd -run supports now -stdin. Thanks a lot. That is viable workaround. I would like to keep this issue open to get the same functionality for rdmd, because: - rdmd is the advertised tool

Re: Blog post: using dynamic libraries in dub

2017-12-25 Thread Jacob Carlborg via Digitalmars-d-announce
On 2017-12-23 21:59, Walter Bright wrote: It'd be nice to collect information on what needs to be done and file a bugzilla issue on it. Otherwise it's just generic "doesn't work on macOS" which contains no useful information. If I knew exactly what would need to be done I would most likely

Re: D as a betterC a game changer ?

2017-12-25 Thread Joakim via Digitalmars-d
On Monday, 25 December 2017 at 00:05:07 UTC, 12345swordy wrote: On Sunday, 24 December 2017 at 22:33:38 UTC, Walter Bright wrote: On 12/24/2017 2:11 AM, Dan Partelly wrote: D is not billed as betterC++ (yet), though Andrei is working on it (essentially building an interface to C++ STL).

Re: Maybe D is right about GC after all !

2017-12-25 Thread Patrick Schluter via Digitalmars-d
On Sunday, 24 December 2017 at 22:21:28 UTC, Tony wrote: On Sunday, 24 December 2017 at 22:04:00 UTC, Dan Partelly wrote: 1995. A dark year. Two of the crappiest language ever devised by man arrived. Both gained traction. Java, through marketing. PhP though tribalism. What makes Java a

Re: Maybe D is right about GC after all !

2017-12-25 Thread Dan Partelly via Digitalmars-d
On Sunday, 24 December 2017 at 22:21:28 UTC, Tony wrote: On Sunday, 24 December 2017 at 22:04:00 UTC, Dan Partelly wrote: 1995. A dark year. Two of the crappiest language ever devised by man arrived. Both gained traction. Java, through marketing. PhP though tribalism. What makes Java a