Re: Maybe D is right about GC after all !

2017-12-26 Thread Walter Bright via Digitalmars-d
On 12/26/2017 3:59 PM, codephantom wrote: On Tuesday, 26 December 2017 at 22:55:18 UTC, Walter Bright wrote: I compiled the code snippet with clang++, a modern C++ compiler, with -Wall. It did not detect the obvious error. https://clang.llvm.org/docs/AddressSanitizer.html That's not mechanic

Re: Maybe D is right about GC after all !

2017-12-26 Thread Walter Bright via Digitalmars-d
On 12/26/2017 4:18 AM, Russel Winder wrote: All of which brings us full circle: when it comes to programming languages and software development, it is all about advocacy, prejudice, and belief, there is very, very little science happening – and most of the science that is happening is in the psyc

Re: D as a betterC a game changer ?

2017-12-26 Thread bachmeier via Digitalmars-d
On Tuesday, 26 December 2017 at 19:34:35 UTC, Mike Franklin wrote: Rust is an example of a language that got it right. Rust got it right for a single, very specialized use case. The cost is that the language is of interest to the tiny fraction of programmers for whom that use case is relevan

Re: Maybe D is right about GC after all !

2017-12-26 Thread codephantom via Digitalmars-d
On Tuesday, 26 December 2017 at 15:53:50 UTC, Russel Winder wrote: Sadly I cannot see either of these happening. There is already too much to pack in to an undergraduate CS (*) course even if first programming and simple algorithms moves out into pre-university education – as has now happened

Re: Maybe D is right about GC after all !

2017-12-26 Thread codephantom via Digitalmars-d
On Tuesday, 26 December 2017 at 16:50:54 UTC, Dan Partelly wrote: Ok I'll bite. Can you recommend me some reasonable easy literature. Something you can read in free time when you travel, not study. Social interactions where always interesting for me. https://en.wikipedia.org/wiki/Civiliza

Re: Maybe D is right about GC after all !

2017-12-26 Thread codephantom via Digitalmars-d
On Tuesday, 26 December 2017 at 22:56:40 UTC, Walter Bright wrote: On 12/26/2017 3:54 AM, codephantom wrote: I simply have to 'forget' to annotate with @safe Not annotating with @safe is mechanically checkable as well. If I were trying to create a marketing campaign for D, as being a safe l

Re: Maybe D is right about GC after all !

2017-12-26 Thread codephantom via Digitalmars-d
On Tuesday, 26 December 2017 at 22:55:18 UTC, Walter Bright wrote: I compiled the code snippet with clang++, a modern C++ compiler, with -Wall. It did not detect the obvious error. https://clang.llvm.org/docs/AddressSanitizer.html

Re: An unfortunate quirk of DMD32 converting floating-point to string

2017-12-26 Thread Walter Bright via Digitalmars-d
On 12/26/2017 3:41 PM, Ivan Kazmenko wrote: While exploring quirks of floating-point values, as well as C/C++/D convenience with them, I stumbled on, in essence, the following (DMD32 on Windows): The issue is really with the DMC++ C runtime library, as that is what Phobos relies on for floatin

An unfortunate quirk of DMD32 converting floating-point to string

2017-12-26 Thread Ivan Kazmenko via Digitalmars-d
While exploring quirks of floating-point values, as well as C/C++/D convenience with them, I stumbled on, in essence, the following (DMD32 on Windows): void main () { import std.stdio : writefln; double x = 128.0;// same for real or float writefln ("%.20a", x); // 0x1.

Re: D as a betterC a game changer ?

2017-12-26 Thread Walter Bright via Digitalmars-d
On 12/26/2017 12:40 AM, Dan Partelly wrote: This is self evident. However, this was not the point of my post. My point was to refute your statement that no C programmer would care about exceptions. If what you say is true, how comes SEH was used so intensively on Windows by C programmers , and

Re: Maybe D is right about GC after all !

2017-12-26 Thread Walter Bright via Digitalmars-d
On 12/26/2017 3:54 AM, codephantom wrote: I simply have to 'forget' to annotate with @safe Not annotating with @safe is mechanically checkable as well.

Re: Maybe D is right about GC after all !

2017-12-26 Thread Walter Bright via Digitalmars-d
On 12/26/2017 1:21 AM, codephantom wrote: My C/C++ code can be 'mechanically' checked too.. and those checks are better than they've even been, and getting better. I compiled the code snippet with clang++, a modern C++ compiler, with -Wall. It did not detect the obvious error.

Re: Maybe D is right about GC after all !

2017-12-26 Thread Walter Bright via Digitalmars-d
On 12/26/2017 1:03 AM, Paolo Invernizzi wrote: The point is that the presence of one @safe: line in the module can be mechanically checked, over one million devs working on a codebase. The whole point of Walter argumentation is 'mechanically'. That's right. C++ is based on faith in the progra

Re: D as a betterC a game changer ?

2017-12-26 Thread Mike Franklin via Digitalmars-d
On Monday, 25 December 2017 at 11:18:58 UTC, Joakim wrote: IOW, it's not a matter of what D got wrong that it needs betterC but what those old languages got wrong that D must adapt to, because of all the old C/C++ code out there. Rust is an example of a language that got it right. It is inh

Re: Maybe D is right about GC after all !

2017-12-26 Thread Russel Winder via Digitalmars-d
On Tue, 2017-12-26 at 16:40 +, Dan Partelly via Digitalmars-d wrote: > […] > Excuse me, since I don't really follow the "raise and fall " of > new languages. Is really Rust rising and shining ? Tiobe (for all > it's flows) put it on 0.530 index, just *below* ADA (great > language, for SW en

Re: Maybe D is right about GC after all !

2017-12-26 Thread Dan Partelly via Digitalmars-d
On Tuesday, 26 December 2017 at 15:53:50 UTC, Russel Winder wrote: There also needs to be much greater education everywhere about socio- technical systems. To be honest I'd prioritise this over programming language design since programmers can always use crap languages, but can they build th

Re: Maybe D is right about GC after all !

2017-12-26 Thread Dan Partelly via Digitalmars-d
On Tuesday, 26 December 2017 at 13:54:09 UTC, Paolo Invernizzi wrote: With C/C++ you simply can't do it anything similar, today (and, IMHO, neither tomorrow): the rising of Rust is here to tell us exactly that. /Paolo Excuse me, since I don't really follow the "raise and fall " of new l

Re: Maybe D is right about GC after all !

2017-12-26 Thread Russel Winder via Digitalmars-d
On Tue, 2017-12-26 at 12:26 +, codephantom via Digitalmars-d wrote: > […] > I genuinely believe, that it is psychological science that will > play the most important role in terms of what programming > languages of the future will look like. > > psychological studies should be integrated in

Re: Who can make Phobos faster to import?

2017-12-26 Thread Joakim via Digitalmars-d
On Tuesday, 26 December 2017 at 13:27:38 UTC, RazvanN wrote: On Thursday, 21 December 2017 at 03:31:16 UTC, Joakim wrote: On Wednesday, 20 December 2017 at 18:21:33 UTC, Andrei Alexandrescu wrote: A tool (call it depend - heh) to automate that would be awesome. For example, this run would make

Re: Maybe D is right about GC after all !

2017-12-26 Thread Paolo Invernizzi via Digitalmars-d
On Tuesday, 26 December 2017 at 11:54:12 UTC, codephantom wrote: On Tuesday, 26 December 2017 at 10:00:25 UTC, Paolo Invernizzi wrote: IMHO, the lost list of vulnerability in code shipped by "first class enterprises" is just crying out that C/C++ is not mechanically checkable. And we are talkin

Re: Who can make Phobos faster to import?

2017-12-26 Thread RazvanN via Digitalmars-d
On Thursday, 21 December 2017 at 03:31:16 UTC, Joakim wrote: On Wednesday, 20 December 2017 at 18:21:33 UTC, Andrei Alexandrescu wrote: On 12/15/2017 02:10 PM, Seb wrote: [...] Dmitry wrote a nice PR for that, and I wrote two: https://github.com/dlang/phobos/pull/5942 https://github.com/dlan

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

2017-12-26 Thread Piotr Klos via Digitalmars-d
On Monday, 25 December 2017 at 22:48:39 UTC, H. S. Teoh wrote: 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 descr

Re: Maybe D is right about GC after all !

2017-12-26 Thread codephantom via Digitalmars-d
On Tuesday, 26 December 2017 at 12:18:09 UTC, Russel Winder wrote: All of which brings us full circle: when it comes to programming languages and software development, it is all about advocacy, prejudice, and belief, there is very, very little science happening – and most of the science that

Re: Maybe D is right about GC after all !

2017-12-26 Thread Russel Winder via Digitalmars-d
On Tue, 2017-12-26 at 08:18 +, Dan Partelly via Digitalmars-d wrote: > […] > I believe in it in the sense that it can be used to stir powerful > social forces to serve propaganda. No language should be without > propaganda, since adoption will most likely be more modulated by > social facto

Re: Maybe D is right about GC after all !

2017-12-26 Thread codephantom via Digitalmars-d
On Tuesday, 26 December 2017 at 10:00:25 UTC, Paolo Invernizzi wrote: IMHO, the lost list of vulnerability in code shipped by "first class enterprises" is just crying out that C/C++ is not mechanically checkable. And we are talking about company that can literally spend an Everest of money on t

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

2017-12-26 Thread Mark via Digitalmars-d
On Monday, 25 December 2017 at 22:48:39 UTC, H. S. Teoh wrote: While I agree that all template parameters ought to be documented and all auto return types thoroughly described, I disagree with explicit naming of auto return types. The whole point of auto return types is to return an *opaque* ty

Re: Maybe D is right about GC after all !

2017-12-26 Thread Paolo Invernizzi via Digitalmars-d
On Tuesday, 26 December 2017 at 09:21:20 UTC, codephantom wrote: On Tuesday, 26 December 2017 at 09:03:31 UTC, Paolo Invernizzi wrote: The point is that the presence of one @safe: line in the module can be mechanically checked, over one million devs working on a codebase. The whole point of

Re: Maybe D is right about GC after all !

2017-12-26 Thread codephantom via Digitalmars-d
On Tuesday, 26 December 2017 at 09:03:31 UTC, Paolo Invernizzi wrote: The point is that the presence of one @safe: line in the module can be mechanically checked, over one million devs working on a codebase. The whole point of Walter argumentation is 'mechanically'. /Paolo My C/C++ code c

Re: Maybe D is right about GC after all !

2017-12-26 Thread Paolo Invernizzi 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(&i); } clang++ -c test.cpp -Wall good examp

Re: Maybe D is right about GC after all !

2017-12-26 Thread codephantom via Digitalmars-d
On Tuesday, 26 December 2017 at 07:33:18 UTC, Mark wrote: Then whoever is using your code (you?) will find that out when they call your functions from a @safe function. And if they forget to annotate their so called 'safe' function with @safe...what happens then? Comparing the 'memory safe

Re: D as a betterC a game changer ?

2017-12-26 Thread Dan Partelly via Digitalmars-d
On Monday, 25 December 2017 at 20:36:56 UTC, Walter Bright wrote: You can use setjmp/longjmp in betterC. After all, they are just library functions. This is self evident. However, this was not the point of my post. My point was to refute your statement that no C programmer would care about

Re: Maybe D is right about GC after all !

2017-12-26 Thread Dan Partelly via Digitalmars-d
On Monday, 25 December 2017 at 10:20:44 UTC, Russel Winder wrote: One persons opinion is irrelevant, unless you believe in advocacy research. I believe in it in the sense that it can be used to stir powerful social forces to serve propaganda. No language should be without propaganda, sin