Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Dicebot via Digitalmars-d
On Friday, 12 December 2014 at 07:48:21 UTC, Walter Bright wrote: I don't see how this is related. It would be perfectly ok to declare root of such tree scope if it was transitive (as long as it only controls access and does not attempt early destruction). Are you suggesting two kinds of scop

Re: Which optimisations are are easier or perhaps only possible in the frontend ?

2014-12-11 Thread Stefan Koch via Digitalmars-d
On Friday, 12 December 2014 at 00:20:30 UTC, deadalnix wrote: More generally, you don't want to optimize anything in the frontend: - It is gonna create unscrutable code for debug. - You optimize before inlining, and so won't get the optimization allowed by inlining. You want to add metada

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Walter Bright via Digitalmars-d
On 12/11/2014 10:06 PM, Dicebot wrote: On Thursday, 11 December 2014 at 21:41:11 UTC, Walter Bright wrote: Consider a ref counted type, RC!T. If scope were transitive, then you could not have, say, a tree where the edges were RC!T. I.e., the payload of an RC type should not be forced to be scope

Re: D3

2014-12-11 Thread thedeemon via Digitalmars-d
On Tuesday, 9 December 2014 at 08:15:02 UTC, Puming wrote: For Chinese it would be "帝" which pronounces the same as 'D' and means Emperor. In Thai language "ดี" pronounces "dee" and means "good".

Re: Do everything in Java…

2014-12-11 Thread ketmar via Digitalmars-d
On Fri, 12 Dec 2014 08:32:39 +0100 Jacob Carlborg via Digitalmars-d wrote: > On 2014-12-11 09:05, ketmar via Digitalmars-d wrote: > > > except that there's no need to parse source code over and over again, > > which is good for other tools (like completion suggesting, intelligent > > code browsi

Re: Do everything in Java…

2014-12-11 Thread Jacob Carlborg via Digitalmars-d
On 2014-12-11 09:05, ketmar via Digitalmars-d wrote: except that there's no need to parse source code over and over again, which is good for other tools (like completion suggesting, intelligent code browsing and so on). Wouldn't you need to parse the IR? -- /Jacob Carlborg

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread via Digitalmars-d
On Thursday, 11 December 2014 at 23:26:33 UTC, deadalnix wrote: I have no idea what you are saying. It sounds like randomly generated gibberish. What is your problem? Scope parameters are trying to address what Rust tried to do with borrowing. To get an idea of where you are going you should

Re: Julia vs. D?

2014-12-11 Thread Laeeth Isharc via Digitalmars-d
On Wednesday, 7 May 2014 at 14:57:36 UTC, Chris wrote: On Wednesday, 7 May 2014 at 12:05:10 UTC, bachmeier wrote: On Wednesday, 7 May 2014 at 09:16:01 UTC, Chris wrote: On Tuesday, 6 May 2014 at 23:19:47 UTC, Mason McGill wrote: On Tuesday, 6 May 2014 at 11:28:21 UTC, Chris wrote: Maybe it's t

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread deadalnix via Digitalmars-d
On Friday, 12 December 2014 at 06:06:40 UTC, Dicebot wrote: On Thursday, 11 December 2014 at 21:41:11 UTC, Walter Bright wrote: Consider a ref counted type, RC!T. If scope were transitive, then you could not have, say, a tree where the edges were RC!T. I.e., the payload of an RC type should not

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Walter Bright via Digitalmars-d
On 12/11/2014 10:04 PM, Dicebot wrote: On Thursday, 11 December 2014 at 08:30:55 UTC, Walter Bright wrote: On 12/10/2014 10:43 PM, Dicebot wrote: On Thursday, 11 December 2014 at 03:30:07 UTC, Walter Bright wrote: If you want data to 'escape' from r.front, then it shouldn't be marked as scope.

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Dicebot via Digitalmars-d
On Friday, 12 December 2014 at 00:13:10 UTC, deadalnix wrote: Therefore, a `scope ref` return value can be passed on to the next function as a `ref` argument. If that function again returns a reference (even if not explicitly designated as `scope`), the compiler will treat it as if it were `sco

Re: struct default constructor, unions and bizaro behavior.

2014-12-11 Thread Dicebot via Digitalmars-d
On Wednesday, 10 December 2014 at 21:57:42 UTC, deadalnix wrote: struct S { union { T1 t1; T2 t2; } T3 t3; } T1 a1; T3 a3; S(a1, a3); This is erroring because t1 is set twice. It turns out that the second parameter of the struct map to t2 rather than t3. This

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Dicebot via Digitalmars-d
On Thursday, 11 December 2014 at 21:41:11 UTC, Walter Bright wrote: Consider a ref counted type, RC!T. If scope were transitive, then you could not have, say, a tree where the edges were RC!T. I.e., the payload of an RC type should not be forced to be scope. I don't see how this is related. I

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Dicebot via Digitalmars-d
On Thursday, 11 December 2014 at 08:30:55 UTC, Walter Bright wrote: On 12/10/2014 10:43 PM, Dicebot wrote: On Thursday, 11 December 2014 at 03:30:07 UTC, Walter Bright wrote: If you want data to 'escape' from r.front, then it shouldn't be marked as scope. Definitely, using scope successfully wi

Re: Error handling in DMD and Bugzilla

2014-12-11 Thread Daniel Murphy via Digitalmars-d
"Etienne" wrote in message news:m6df1k$11vl$1...@digitalmars.com... I doubt dustmite could work for my use case. I develop the entire application before compiling, so I usually end up with 1000s of code errors to go through. Some IOCs turn up, so I usually have to tweak the compiler to keep o

Re: Jonathan Blow demo #2

2014-12-11 Thread Walter Bright via Digitalmars-d
On 12/11/2014 1:49 PM, bearophile wrote: Walter Bright: struct Vec { float x = 1, y = 5, z = 9; } auto v = new Vec(void); auto av = new Vec[10] = void; auto av2 = new Vec[10] = Vec(0, 0, 0); D already does this. D doesn't do that, not even one of those three :-) I beg to differ: struct

Re: Jonathan Blow demo #2

2014-12-11 Thread Walter Bright via Digitalmars-d
On 12/11/2014 1:49 PM, bearophile wrote: He suggests a way to optionally specify the type of array indexes. In a D-like syntax it could be: enum N = 10; float[N : ushort] a1; float[: ushort] a2; I don't see any point to this. My point of having this in D is to optionally increase strictness

Re: ddox-generated Phobos documentation is available for review

2014-12-11 Thread Martin Nowak via Digitalmars-d
On 12/11/2014 03:45 PM, Tobias Pankrath wrote: std.container.Array is shadowed by std.container.Array!bool. redBlackTree shadows RedBlackTree as well. We fixed that issue already, please have a look at the preview. https://dlang.dawg.eu/library/index.html https://dlang.dawg.eu/library-prerelea

Re: Error handling in DMD and Bugzilla

2014-12-11 Thread Etienne via Digitalmars-d
On 2014-12-11 8:05 PM, Etienne wrote: errors to go through. Some IOCs turn up, so I usually have to tweak the IOC should be ICE (internal compiler error). Brain runs slow at EOD ;)

Re: ddox-generated Phobos documentation is available for review

2014-12-11 Thread Martin Nowak via Digitalmars-d
On 03/10/2014 03:56 PM, Andrei Alexandrescu wrote: All: how does one turn off css hyphenation? Andrei You're again using that crappy JS hyphenation? Last time we had a performance problem with it, I wrote this super efficient D library http://code.dlang.org/packages/hyphenate. It could easily

Re: ddox-generated Phobos documentation is available for review

2014-12-11 Thread Martin Nowak via Digitalmars-d
On 12/12/2014 02:05 AM, Martin Nowak wrote: You're again using that crappy JS hyphenation? No, you don't it's css hyphenation. Sorry for the tone.

Re: Error handling in DMD and Bugzilla

2014-12-11 Thread Etienne via Digitalmars-d
On 2014-12-11 4:34 PM, Daniel Murphy wrote: It really helps to have a minimal test case for the bug, otherwise it's difficult for reviewers to tell if the fix is in the correct place. It should be fairly easy to reduce a larger project that fails on an assertion down to a small test case using

Re: Which optimisations are are easier or perhaps only possible in the frontend ?

2014-12-11 Thread deadalnix via Digitalmars-d
On Thursday, 11 December 2014 at 11:02:31 UTC, Stefan Koch wrote: On Thursday, 11 December 2014 at 10:59:24 UTC, Daniel Murphy wrote: Why? If the inliner is out because of DMD's merging process, then so is the rest of the frontend. It is not out! But my question was not about dmd specific

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread deadalnix via Digitalmars-d
On Thursday, 11 December 2014 at 14:12:16 UTC, Nick Treleaven wrote: On 09/12/2014 16:25, Steven Schveighoffer wrote: Will ref just automatically bind to any scoped reference? A ref parameter essentially is a scope ref parameter, but it can also be returned: http://forum.dlang.org/post/m64v3

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread deadalnix via Digitalmars-d
On Thursday, 11 December 2014 at 15:37:27 UTC, bearophile wrote: Nick Treleaven: Sometimes innovative workarounds are developed that are difficult to foresee in advance - e.g. in Rust their type system can be restrictive, but they rely on trusted library functions/types to make more things po

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread deadalnix via Digitalmars-d
On Thursday, 11 December 2014 at 13:55:55 UTC, Marc Schütz wrote: On Thursday, 11 December 2014 at 12:48:05 UTC, Manu via Digitalmars-d wrote: On 8 December 2014 at 07:29, Walter Bright via Digitalmars-d wrote: On 12/7/2014 6:12 AM, Dicebot wrote: But from existing cases it doesn't seem work

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread deadalnix via Digitalmars-d
On Thursday, 11 December 2014 at 09:07:44 UTC, Ola Fosheim Grøstad wrote: On Thursday, 11 December 2014 at 00:35:46 UTC, deadalnix wrote: It is always safe to consider scopeness of the retrun value (if marked scope) as being the intersection of the lifetime of parameters. That should cover mo

Re: struct default constructor, unions and bizaro behavior.

2014-12-11 Thread deadalnix via Digitalmars-d
On Thursday, 11 December 2014 at 16:20:33 UTC, Steven Schveighoffer wrote: I'm not sure it's reasonable to expect this much out of the compiler-generated default ctor. It probably just does the equivalent of this.tupleof[0..args.length] = args; Can't you just add a constructor for it? -Steve

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread John Colvin via Digitalmars-d
On Thursday, 11 December 2014 at 21:41:11 UTC, Walter Bright wrote: On 12/11/2014 4:47 AM, Manu via Digitalmars-d wrote: On 8 December 2014 at 07:29, Walter Bright via Digitalmars-d wrote: On 12/7/2014 6:12 AM, Dicebot wrote: But from existing cases it doesn't seem working good enough. For

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Dmitry Olshansky via Digitalmars-d
12-Dec-2014 00:41, Walter Bright пишет: On 12/11/2014 4:47 AM, Manu via Digitalmars-d wrote: On 8 December 2014 at 07:29, Walter Bright via Digitalmars-d wrote: I don't have the perfect proposal, but I feel very strongly about 2 things: 1. It must not be a storage class; the concept was a di

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Walter Bright via Digitalmars-d
On 12/11/2014 4:47 AM, Manu via Digitalmars-d wrote: On 8 December 2014 at 07:29, Walter Bright via Digitalmars-d wrote: On 12/7/2014 6:12 AM, Dicebot wrote: But from existing cases it doesn't seem working good enough. For example, not being able to represent idiom of `scope ref int foo(scope

Re: Jonathan Blow demo #2

2014-12-11 Thread bearophile via Digitalmars-d
Walter Bright: struct Vec { float x = 1, y = 5, z = 9; } auto v = new Vec(void); auto av = new Vec[10] = void; auto av2 = new Vec[10] = Vec(0, 0, 0); D already does this. D doesn't do that, not even one of those three :-) I'm willing to open one or two ERs later on those things. At best in

Re: Jonathan Blow demo #2

2014-12-11 Thread bearophile via Digitalmars-d
Walter Bright: struct Vec { float x = 1, y = 5, z = 9; } auto v = new Vec(void); auto av = new Vec[10] = void; auto av2 = new Vec[10] = Vec(0, 0, 0); D already does this. D doesn't do that, not even one of those three :-) I'm willing to open one or two ERs later on those things. At best

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Walter Bright via Digitalmars-d
On 12/11/2014 8:26 AM, Steven Schveighoffer wrote: Please, put this in the DIP! This is exactly the thing I had been asking for here: http://forum.dlang.org/post/m5sitd$1ki0$1...@digitalmars.com Thanks, I'll re-read the proposal with this in mind. Marc is clearly better at explaining things th

Re: Error handling in DMD and Bugzilla

2014-12-11 Thread Daniel Murphy via Digitalmars-d
"Etienne" wrote in message news:m6cb67$2fa3$1...@digitalmars.com... I've found 2 internal compiler errors so far, but they have been occurring in very complex circumstances that I haven't been able to isolate within reasonable time frames (~ 1 hour). https://github.com/etcimon/dmd/commit/32f

Re: Jonathan Blow demo #2

2014-12-11 Thread Walter Bright via Digitalmars-d
On 12/11/2014 8:57 AM, bearophile wrote: He shows a way to not initialize a struct that has specified values. In D it could be: struct Vec { float x = 1, y = 5, z = 9; } auto v = new Vec(void); auto av = new Vec[10] = void; auto av2 = new Vec[10] = Vec(0, 0, 0); D already does this. It's been

Re: Do everything in Java…

2014-12-11 Thread Dmitry Olshansky via Digitalmars-d
11-Dec-2014 04:17, Walter Bright пишет: On 12/10/2014 10:28 AM, H. S. Teoh via Digitalmars-d wrote: Yeah, the compiler cannot instantiate the template without access to the full body. It *could*, though, if we were to store template body IR in object files, perhaps under specially-dedicated obje

Re: Error handling in DMD and Bugzilla

2014-12-11 Thread Max Klyga via Digitalmars-d
On 2014-12-11 14:53:57 +, Etienne said: I've found 2 internal compiler errors so far, but they have been occurring in very complex circumstances that I haven't been able to isolate within reasonable time frames (~ 1 hour). https://github.com/etcimon/dmd/commit/32f2b44c8c126243f9c4ff00b89b

Jonathan Blow demo #2

2014-12-11 Thread bearophile via Digitalmars-d
Jonathan Blow, Programming Language Demo #2: https://www.youtube.com/watch?v=-UPFH0eWHEI https://www.reddit.com/r/programming/comments/2oyg5e/jonathan_blow_dec_10_programming_language_demo_2/ -- He shows a way to not initialize a struct that has specified values. In D it could

Re: Can we make Throwable an interface?

2014-12-11 Thread Lars T. Kyllingstad via Digitalmars-d
On Thursday, 11 December 2014 at 15:04:53 UTC, Jacob Carlborg wrote: On 2014-12-11 08:21, Lars T. Kyllingstad wrote: I'm not sure what is the best way to achieve this in D, but one option is to use an (associative?) array of Variants. How does Boost implement this? Classes that contain the

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Steven Schveighoffer via Digitalmars-d
On 12/11/14 8:55 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?= " wrote: On Thursday, 11 December 2014 at 12:48:05 UTC, Manu via Digitalmars-d wrote: On 8 December 2014 at 07:29, Walter Bright via Digitalmars-d wrote: On 12/7/2014 6:12 AM, Dicebot wrote: But from existing cases it doesn't seem working g

Re: Which optimisations are are easier or perhaps only possible in the frontend ?

2014-12-11 Thread Stefan Koch via Digitalmars-d
On Thursday, 11 December 2014 at 12:20:50 UTC, Manu via Digitalmars-d wrote: I've often thought one of the biggest wins that would seem to affect my code would be comprehensive value range propagation. assert's and contracts can give value range information to the compiler, also comparison state

Re: struct default constructor, unions and bizaro behavior.

2014-12-11 Thread Steven Schveighoffer via Digitalmars-d
On 12/10/14 4:57 PM, deadalnix wrote: struct S { union { T1 t1; T2 t2; } T3 t3; } T1 a1; T3 a3; S(a1, a3); This is erroring because t1 is set twice. It turns out that the second parameter of the struct map to t2 rather than t3. This behavior do not make a

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread bearophile via Digitalmars-d
Nick Treleaven: Sometimes innovative workarounds are developed that are difficult to foresee in advance - e.g. in Rust their type system can be restrictive, but they rely on trusted library functions/types to make more things possible in a safe way. Ideally a type system should be flexible e

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread via Digitalmars-d
On Thursday, 11 December 2014 at 13:43:07 UTC, Nick Treleaven wrote: It will, use @system. Yes… Maybe this proposal will be supplemented later, but there are always costs to making the language more complicated. We need to be certain they are worth it before adding them. A cautious approach

Re: Can we make Throwable an interface?

2014-12-11 Thread Jacob Carlborg via Digitalmars-d
On 2014-12-11 08:21, Lars T. Kyllingstad wrote: I'm not sure what is the best way to achieve this in D, but one option is to use an (associative?) array of Variants. How does Boost implement this? -- /Jacob Carlborg

Error handling in DMD and Bugzilla

2014-12-11 Thread Etienne via Digitalmars-d
I've found 2 internal compiler errors so far, but they have been occurring in very complex circumstances that I haven't been able to isolate within reasonable time frames (~ 1 hour). https://github.com/etcimon/dmd/commit/32f2b44c8c126243f9c4ff00b89b175c9e596e7f https://github.com/D-Programming

Re: ddox-generated Phobos documentation is available for review

2014-12-11 Thread Tobias Pankrath via Digitalmars-d
On Monday, 10 March 2014 at 03:44:54 UTC, Andrei Alexandrescu wrote: Consider it alpha quality. Please don't announce yet before we put it in good shape. https://github.com/D-Programming-Language/dlang.org/pull/516 http://dlang.org/library http://dlang.org/library-prerelease I needed to chan

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread John Colvin via Digitalmars-d
On Thursday, 11 December 2014 at 13:55:55 UTC, Marc Schütz wrote: On Thursday, 11 December 2014 at 12:48:05 UTC, Manu via Digitalmars-d wrote: On 8 December 2014 at 07:29, Walter Bright via Digitalmars-d wrote: On 12/7/2014 6:12 AM, Dicebot wrote: But from existing cases it doesn't seem work

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Nick Treleaven via Digitalmars-d
On 09/12/2014 16:25, Steven Schveighoffer wrote: Will ref just automatically bind to any scoped reference? A ref parameter essentially is a scope ref parameter, but it can also be returned: http://forum.dlang.org/post/m64v3g$2bga$1...@digitalmars.com

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread via Digitalmars-d
On Thursday, 11 December 2014 at 12:48:05 UTC, Manu via Digitalmars-d wrote: On 8 December 2014 at 07:29, Walter Bright via Digitalmars-d wrote: On 12/7/2014 6:12 AM, Dicebot wrote: But from existing cases it doesn't seem working good enough. For example, not being able to represent idiom o

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Nick Treleaven via Digitalmars-d
On 11/12/2014 09:07, "Ola Fosheim Grøstad" " wrote: If I as a programmer know that something is safe, then the compiler should accept it, and the language should allow me express it. It will, use @system. Maybe this proposal will be supplemented later, but there are always costs to making the

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread ixid via Digitalmars-d
Manu have you shown Walter some of the code where ref is problematic? He seems to have asked to see examples repeatedly as he's not convinced there is a problem.

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Manu via Digitalmars-d
On 8 December 2014 at 07:29, Walter Bright via Digitalmars-d wrote: > On 12/7/2014 6:12 AM, Dicebot wrote: >> >> But from existing cases it doesn't seem working good enough. For example, >> not >> being able to represent idiom of `scope ref int foo(scope ref int x) { >> return x; >> }` seems very

Re: Which optimisations are are easier or perhaps only possible in the frontend ?

2014-12-11 Thread Daniel Murphy via Digitalmars-d
"Manu via Digitalmars-d" wrote in message news:mailman.3072.1418300450.9932.digitalmar...@puremagic.com... I've often thought one of the biggest wins that would seem to affect my code would be comprehensive value range propagation. assert's and contracts can give value range information to the

Re: Redesign of dlang.org

2014-12-11 Thread Martin Nowak via Digitalmars-d
On Thursday, 11 December 2014 at 12:22:46 UTC, Martin Nowak wrote: Already submitted a bunch of pulls. https://github.com/D-Programming-Language/dlang.org/pulls?q=is%3Apr+author%3AMartinNowak+is%3Aclosed I'd be thankful for any help on that. Cloning dlang.org and running make -f posix.mak shoul

Re: Do everything in Java…

2014-12-11 Thread ketmar via Digitalmars-d
On Thu, 11 Dec 2014 12:11:35 + Tobias Pankrath via Digitalmars-d wrote: > If what you have in mind is indeed impossible with current object > files, it may > be worthwhile to create our own. But as I see it, the only > benefit of storing an AST is compilation speed, which currently > is no

Re: Do everything in Java…

2014-12-11 Thread ketmar via Digitalmars-d
On Thu, 11 Dec 2014 12:06:39 + Paulo Pinto via Digitalmars-d wrote: > > with "AST-companions" D is in position to occupy that niche. D > > is > > c-like, D has great metaprogramming abilities, D is > > open-source. it's > > doomed to win. > > To be honest, with .NET Native and OpenJDK get

Re: Redesign of dlang.org

2014-12-11 Thread Martin Nowak via Digitalmars-d
What's up with this new website design ? Drafts looked good. Yeah, draft looks good, but this didn't got the priority and support it deserves. My plan is to incrementally improve the current website until it looks reasonable. Already submitted a bunch of pulls. You can see a preview here http

Re: Do everything in Java…

2014-12-11 Thread ketmar via Digitalmars-d
On Thu, 11 Dec 2014 12:02:43 + Tobias Pankrath via Digitalmars-d wrote: > On Thursday, 11 December 2014 at 11:46:50 UTC, ketmar via > Digitalmars-d wrote: > > > > you can't see how this can help 'cause we don't have such > > AST-companions yet. i can see how this will help 'cause i have > >

Re: Which optimisations are are easier or perhaps only possible in the frontend ?

2014-12-11 Thread Manu via Digitalmars-d
On 11 December 2014 at 21:02, Stefan Koch via Digitalmars-d wrote: > On Thursday, 11 December 2014 at 10:59:24 UTC, Daniel Murphy wrote: > >> Why? If the inliner is out because of DMD's merging process, then so is >> the rest of the frontend. > > > It is not out! > > But my question was not about

Re: Do everything in Java…

2014-12-11 Thread Tobias Pankrath via Digitalmars-d
the core of the component framework a-la BlackBox Component Builder is dynamic module system. this requires dynamic linker, and the linker must know alot about framework internals to be fast and usable. with precompiled modules which keeps symbolic information and ASTs for templates such linke

Re: Do everything in Java…

2014-12-11 Thread ketmar via Digitalmars-d
On Thu, 11 Dec 2014 12:04:28 + Paulo Pinto via Digitalmars-d wrote: > BlackBox! A fellow user. :) yeah! i miss BCB almost every day i'm doing any coding. > Another example, the Oberon operating system, specially the > System 3 Gadgets framework. yep, they have the same roots. i didn't ment

Re: Do everything in Java…

2014-12-11 Thread Paulo Pinto via Digitalmars-d
On Thursday, 11 December 2014 at 12:00:25 UTC, ketmar via Digitalmars-d wrote: On Thu, 11 Dec 2014 10:51:21 + Tobias Pankrath via Digitalmars-d wrote: >> Come on, that is not even a half decent analogy. > it is. you can't see any uses of (semi)compiled module files > (and i > can; it's

Re: Do everything in Java…

2014-12-11 Thread Paulo Pinto via Digitalmars-d
On Thursday, 11 December 2014 at 11:46:50 UTC, ketmar via Digitalmars-d wrote: On Thu, 11 Dec 2014 09:44:49 + John Colvin via Digitalmars-d wrote: Parsing is so fast it's not worth spending huge numbers of man-hours building an effective cacheing system for it. and generating machine cod

Re: Do everything in Java…

2014-12-11 Thread Tobias Pankrath via Digitalmars-d
On Thursday, 11 December 2014 at 11:46:50 UTC, ketmar via Digitalmars-d wrote: you can't see how this can help 'cause we don't have such AST-companions yet. i can see how this will help 'cause i have alot of expirience with turbo/borland pascal and BlackBox Component Builder. think a-la BCB ca

Re: Do everything in Java…

2014-12-11 Thread ketmar via Digitalmars-d
On Thu, 11 Dec 2014 10:51:21 + Tobias Pankrath via Digitalmars-d wrote: > >> Come on, that is not even a half decent analogy. > > it is. you can't see any uses of (semi)compiled module files > > (and i > > can; it's essential for component framework, for example). i > > can't see > > any us

Re: Do everything in Java…

2014-12-11 Thread ketmar via Digitalmars-d
On Thu, 11 Dec 2014 09:44:49 + John Colvin via Digitalmars-d wrote: > Parsing is so fast it's not worth spending huge numbers of > man-hours building an effective cacheing system for it. and generating machine code is useless at all, it's enough to simply improve CTFE. > The rest > of comp

Re: Which optimisations are are easier or perhaps only possible in the frontend ?

2014-12-11 Thread Stefan Koch via Digitalmars-d
On Thursday, 11 December 2014 at 10:59:24 UTC, Daniel Murphy wrote: Why? If the inliner is out because of DMD's merging process, then so is the rest of the frontend. It is not out! But my question was not about dmd specific things, I meant it more generally.

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread zeljkog via Digitalmars-d
On Thursday, 4 December 2014 at 10:00:37 UTC, Walter Bright wrote: On 12/4/2014 1:51 AM, eles wrote: Making it implicit and requiring an explicit "escape" for un-scoped variables? Was afraid that would break too much code. Compiler switch: escape=I(gnore)|W(arning)|E(rror). For transitio

Re: Which optimisations are are easier or perhaps only possible in the frontend ?

2014-12-11 Thread Daniel Murphy via Digitalmars-d
"Stefan Koch" wrote in message news:opqczmamanzwcerpa...@forum.dlang.org... Could we come back to the topic ? :) Why? If the inliner is out because of DMD's merging process, then so is the rest of the frontend.

Re: Do everything in Java…

2014-12-11 Thread Tobias Pankrath via Digitalmars-d
Come on, that is not even a half decent analogy. it is. you can't see any uses of (semi)compiled module files (and i can; it's essential for component framework, for example). i can't see any uses of compiled binaries (i don't need that in component framework). Actually I asked in this thread

Re: Do everything in Java…

2014-12-11 Thread Araq via Digitalmars-d
On Wednesday, 10 December 2014 at 23:23:50 UTC, Walter Bright wrote: On 12/10/2014 4:15 AM, Paulo Pinto wrote: I prefer the model used by the referred languages, where binary libraries and metadata is used, instead of the C toolchain model. For example, just shipping the .TPU/.DCU libraries in

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread zeljkog via Digitalmars-d
On 11.12.14 08:25, Shammah Chancellor wrote: This is exactly why this feature should be default behavior with compiler warnings generated when things escape scope. It can be compiler switch escape=I(gnore)|W(arning)|E(rror).

Re: Do everything in Java…

2014-12-11 Thread John Colvin via Digitalmars-d
On Thursday, 11 December 2014 at 09:07:18 UTC, ketmar via Digitalmars-d wrote: On Thu, 11 Dec 2014 08:57:56 + Tobias Pankrath via Digitalmars-d wrote: >> >> Storing it as body IR accomplishes nothing practical over >> storing it as source file, i.e. .di files. > except that there's no n

Re: Do everything in Java…

2014-12-11 Thread ketmar via Digitalmars-d
On Thu, 11 Dec 2014 09:18:05 + Tobias Pankrath via Digitalmars-d wrote: > >> Which usually hold an AST in memory anyway. We have a fast > >> parser, parsing even a big codebase once is really not a > >> problem, see DCD for example. > >> > >> If the only advantage is to skip a parsing stag

Re: Do everything in Java…

2014-12-11 Thread Tobias Pankrath via Digitalmars-d
Which usually hold an AST in memory anyway. We have a fast parser, parsing even a big codebase once is really not a problem, see DCD for example. If the only advantage is to skip a parsing stage here or there, it does not justify the work that would be needed. as we have a fast compiler too,

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread via Digitalmars-d
On Thursday, 11 December 2014 at 00:35:46 UTC, deadalnix wrote: It is always safe to consider scopeness of the retrun value (if marked scope) as being the intersection of the lifetime of parameters. That should cover most bases, and we can still extends later if this is too limited (I suspect

Re: Do everything in Java…

2014-12-11 Thread ketmar via Digitalmars-d
On Thu, 11 Dec 2014 08:57:56 + Tobias Pankrath via Digitalmars-d wrote: > >> > >> Storing it as body IR accomplishes nothing practical over > >> storing it as source file, i.e. .di files. > > except that there's no need to parse source code over and over > > again, > > which is good for ot

Re: Do everything in Java…

2014-12-11 Thread Paulo Pinto via Digitalmars-d
On Thursday, 11 December 2014 at 08:05:13 UTC, ketmar via Digitalmars-d wrote: On Wed, 10 Dec 2014 17:17:11 -0800 Walter Bright via Digitalmars-d wrote: On 12/10/2014 10:28 AM, H. S. Teoh via Digitalmars-d wrote: > Yeah, the compiler cannot instantiate the template without > access to the >

Re: Do everything in Java…

2014-12-11 Thread Tobias Pankrath via Digitalmars-d
Storing it as body IR accomplishes nothing practical over storing it as source file, i.e. .di files. except that there's no need to parse source code over and over again, which is good for other tools (like completion suggesting, intelligent code browsing and so on). Which usually hold an A

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Walter Bright via Digitalmars-d
On 12/10/2014 10:43 PM, Dicebot wrote: On Thursday, 11 December 2014 at 03:30:07 UTC, Walter Bright wrote: If you want data to 'escape' from r.front, then it shouldn't be marked as scope. Definitely, using scope successfully will require some rethinking of how code is written. Allowing or proh

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread Walter Bright via Digitalmars-d
On 12/10/2014 11:55 PM, deadalnix wrote: On Thursday, 11 December 2014 at 07:30:03 UTC, Walter Bright wrote: On 12/10/2014 8:56 PM, deadalnix wrote: On Thursday, 11 December 2014 at 03:27:08 UTC, Walter Bright wrote: I disagree. It's critical for chaining one function to the next. I one can'

Re: problem with size_t and an easy solution

2014-12-11 Thread ketmar via Digitalmars-d
On Thu, 11 Dec 2014 05:56:23 + Ivan Kazmenko via Digitalmars-d wrote: > On the other hand, I'm fine with the current state, and without > evidence from your side, it's not going to change. So the > inversion of who should bring proofs is also a false claim. it's not going to change even if

Re: Do everything in Java…

2014-12-11 Thread ketmar via Digitalmars-d
On Wed, 10 Dec 2014 17:17:11 -0800 Walter Bright via Digitalmars-d wrote: > On 12/10/2014 10:28 AM, H. S. Teoh via Digitalmars-d wrote: > > Yeah, the compiler cannot instantiate the template without access to the > > full body. It *could*, though, if we were to store template body IR in > > objec

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread ketmar via Digitalmars-d
On Wed, 10 Dec 2014 23:06:13 -0800 Shammah Chancellor via Digitalmars-d wrote: > > Was afraid that would break too much code. > No, this is super important. Break it all! alas, not in this life. each "break our code" just making resistance harder. ;-) signature.asc Description: PGP signature

Re: DIP69 - Implement scope for escape proof references

2014-12-11 Thread deadalnix via Digitalmars-d
On Thursday, 11 December 2014 at 07:30:03 UTC, Walter Bright wrote: On 12/10/2014 8:56 PM, deadalnix wrote: On Thursday, 11 December 2014 at 03:27:08 UTC, Walter Bright wrote: I disagree. It's critical for chaining one function to the next. I one can't return, one can't chain. I guess I'm n