Re: Python : Pythonista / Ruby: Rubyist : / D : ?

2017-04-21 Thread Namespace via Digitalmars-d
On Friday, 21 April 2017 at 17:20:14 UTC, Vasudev Ram wrote: Hi list, I hope the question is self-evident from the message subject. If not, it means: what are D developers generally called (to indicate that they develop in D)? The question occurred to me somehow while browsing some D posts on

Re: const(Class) is mangled as Class const* const

2017-03-26 Thread Namespace via Digitalmars-d
On Sunday, 26 March 2017 at 14:30:00 UTC, deadalnix wrote: On Sunday, 26 March 2017 at 10:43:11 UTC, Benjamin Thaut wrote: As you see from the above example D mangles the getClassConst as a "Class const * const" instead of a "Class const *" ("YAQEBV" vs "YAPEBV"). Is this expected behavior? I

Re: why std.stdio.File is a struct?

2016-10-23 Thread Namespace via Digitalmars-d
On Sunday, 23 October 2016 at 06:36:21 UTC, Jonathan M Davis wrote: You can mark a parameter as ref, and you get something similar to C++'s &, except that it only works on parameters, return types, and the variable for the current element in a foreach loop (you can't declare local variables tha

Re: I close BIP27. I won't be pursuing BIPs anymore

2016-10-20 Thread Namespace via Digitalmars-d
On Thursday, 20 October 2016 at 10:23:40 UTC, Ethan Watson wrote: On Wednesday, 19 October 2016 at 10:32:56 UTC, Walter Bright wrote: Better: void f(ref Vector v); void f(Vector v) { f(v); } f(Vector(10,20,30)); Suitable enough for simple functions. But beyond that becomes maintena

Re: Binding rvalues to ref [WAS: I close BIP27. I won't be pursuing BIPs anymore]

2016-10-19 Thread Namespace via Digitalmars-d
On Wednesday, 19 October 2016 at 19:19:35 UTC, Jonathan M Davis wrote: That's an orthogonal issue. My point is that normally, a parameter is a ref parameter, because the function is going to use that value and potentially mutate it in the process, and you want the original variable that was pas

Re: Binding rvalues to ref [WAS: I close BIP27. I won't be pursuing BIPs anymore]

2016-10-19 Thread Namespace via Digitalmars-d
On Wednesday, 19 October 2016 at 18:15:25 UTC, Jonathan M Davis wrote: Which then causes the problem that it becomes much less clear whether ref is supposed to be modifying its argument or is just trying to avoid copying it - though good documentation can mitigate that problem. - Jonathan M D

Re: I close BIP27. I won't be pursuing BIPs anymore

2016-10-19 Thread Namespace via Digitalmars-d
On Wednesday, 19 October 2016 at 17:42:39 UTC, Guillaume Piolat wrote: On Tuesday, 18 October 2016 at 06:30:15 UTC, Namespace wrote: On Tuesday, 18 October 2016 at 02:54:08 UTC, Manu wrote: I just want to be able to pass an rvalue to a function that receives a const ref... that's why I ca

Re: I close BIP27. I won't be pursuing BIPs anymore

2016-10-18 Thread Namespace via Digitalmars-d
On Tuesday, 18 October 2016 at 17:51:19 UTC, Jonathan M Davis wrote: On Tuesday, October 18, 2016 13:36:42 Namespace via Digitalmars-d wrote: On Tuesday, 18 October 2016 at 09:50:35 UTC, ketmar wrote: > On Tuesday, 18 October 2016 at 06:30:15 UTC, Namespace wrote: >> On Tuesday, 18 Oct

Re: I close BIP27. I won't be pursuing BIPs anymore

2016-10-18 Thread Namespace via Digitalmars-d
On Tuesday, 18 October 2016 at 09:50:35 UTC, ketmar wrote: On Tuesday, 18 October 2016 at 06:30:15 UTC, Namespace wrote: On Tuesday, 18 October 2016 at 02:54:08 UTC, Manu wrote: I just want to be able to pass an rvalue to a function that receives a const ref... that's why I came to this

Re: I close BIP27. I won't be pursuing BIPs anymore

2016-10-17 Thread Namespace via Digitalmars-d
On Tuesday, 18 October 2016 at 02:54:08 UTC, Manu wrote: I just want to be able to pass an rvalue to a function that receives a const ref... that's why I came to this forum in the first place like, 7 years ago. 7 years later... still can't. I recently wrote a PR for p0nce D idioms, which show

Re: Who wore it better?

2016-04-15 Thread Namespace via Digitalmars-d
Since it is a template: Why these attributes: @trusted pure nothrow ?

Re: A comparison between C++ and D

2016-03-09 Thread Namespace via Digitalmars-d
On Wednesday, 9 March 2016 at 01:18:26 UTC, maik klein wrote: Direct link: https://maikklein.github.io/post/CppAndD/ Reddit link: https://www.reddit.com/r/programming/comments/49lna6/a_comparison_between_c_and_d/ If you spot any mistakes, please let me know. I'm missing the wildcard modifier

Re: rval->ref const(T), implicit conversions

2016-01-18 Thread Namespace via Digitalmars-d
That is mine. I closed it after it was more or less abandoned.

Re: rval->ref const(T), implicit conversions

2016-01-18 Thread Namespace via Digitalmars-d
You don't give up, huh? ;)

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Namespace via Digitalmars-d
On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote: Why care about this? Even Rust doesn't try to solve this problem...because it isn't really a problem in practice. In c++/rust code you use value/unique types 99.9% of the time, and reference counting is only for shared/aliased

Re: D 2015/2016 Vision?

2015-10-07 Thread Namespace via Digitalmars-d
On Wednesday, 7 October 2015 at 11:27:49 UTC, Marc Schütz wrote: On Wednesday, 7 October 2015 at 10:03:44 UTC, Namespace wrote: Because there is no guarantee that others, who use your code, get it right and use those constructs. The obvious way would be to make the constructor private and

Re: D 2015/2016 Vision?

2015-10-07 Thread Namespace via Digitalmars-d
Well, except that then it's less obvious that an object is ref-counted and less likely that the programmer using it will realize that the object expects to have a deterministic lifetime. So, it might actually make the situation worse and make it so that programmers are more likely to get wrong.

Re: D 2015/2016 Vision?

2015-10-07 Thread Namespace via Digitalmars-d
Language-supported ref-counting wouldn't fix that. As long as you're allowed to put a ref-counted object inside of a GC-managed object, it's possible that the GC will ultimately managed the lifetime of your ref-counted object - or even that it will never be destroyed, because it simply isn't co

Re: D 2015/2016 Vision?

2015-10-07 Thread Namespace via Digitalmars-d
On Wednesday, 7 October 2015 at 09:49:27 UTC, Marc Schütz wrote: On Tuesday, 6 October 2015 at 17:03:07 UTC, bitwise wrote: On Tuesday, 6 October 2015 at 06:45:47 UTC, Jonathan M Davis wrote: On Monday, 5 October 2015 at 23:08:37 UTC, bitwise wrote: Well, again that has it's pros and cons. This

Re: D 2015/2016 Vision?

2015-10-06 Thread Namespace via Digitalmars-d
You don't need RC, just use Unique. In most cases you don't want to use RC, because you never have control over the ownership.

Re: D 2015/2016 Vision?

2015-10-06 Thread Namespace via Digitalmars-d
It's a step simpler with the new inline feature (works sadly only with the -inline flag): pragma(inline, true) auto scoped(T, Args...)(auto ref Args args) if (is(T == class)) { void[__traits(classInstanceSize, T)] buf = void; buf[] = typeid(T).init[]; T obj = cast(T) buf.ptr;

Re: D 2015/2016 Vision?

2015-10-06 Thread Namespace via Digitalmars-d
On Monday, 5 October 2015 at 22:15:59 UTC, bitwise wrote: On Monday, 5 October 2015 at 21:29:20 UTC, Namespace wrote: But you can simply relinquish alias this and use opDispatch. Problem solved. I don't understand what you mean. import std.stdio; struct Scoped(T) { private

Re: D 2015/2016 Vision?

2015-10-05 Thread Namespace via Digitalmars-d
But you can simply relinquish alias this and use opDispatch. Problem solved.

Re: D 2015/2016 Vision?

2015-10-05 Thread Namespace via Digitalmars-d
On Monday, 5 October 2015 at 20:49:08 UTC, bitwise wrote: On Monday, 5 October 2015 at 20:23:41 UTC, Namespace wrote: On Monday, 5 October 2015 at 19:07:20 UTC, Meta wrote: [...] import std.stdio; [...] I think you kinda missed the point. The second one was _supposed_ to be typed as

Re: D 2015/2016 Vision?

2015-10-05 Thread Namespace via Digitalmars-d
On Monday, 5 October 2015 at 19:07:20 UTC, Meta wrote: On Monday, 5 October 2015 at 17:19:09 UTC, Gary Willoughby wrote: This can be shortened to: import std.stdio; import std.typecons; class A { string name; this(string name) { this.name = name;

Re: D 2015/2016 Vision?

2015-10-04 Thread Namespace via Digitalmars-d
On Sunday, 4 October 2015 at 20:18:25 UTC, rsw0x wrote: On Sunday, 4 October 2015 at 18:02:21 UTC, bitwise wrote: Currently, it seems like someone will eventually take all these classes/hierarchies and flatten them into some struct/template approach. I am not looking forward to this at all. I

Re: Reasons to use D

2015-09-11 Thread Namespace via Digitalmars-d
On Friday, 11 September 2015 at 13:15:03 UTC, Adam D. Ruppe wrote: On Friday, 11 September 2015 at 12:30:42 UTC, Ola Fosheim Grøstad wrote: I find the viewpoints of the student who wrote 18000 lines of D code interesting. "3. The documentation poor." I agree but so is the documentation fo

Re: auto ref is on the docket

2015-06-24 Thread Namespace via Digitalmars-d
On Wednesday, 24 June 2015 at 17:45:15 UTC, Marc Schütz wrote: On Wednesday, 24 June 2015 at 09:54:01 UTC, Jonathan M Davis wrote: On Wednesday, 24 June 2015 at 09:26:49 UTC, Temtaime wrote: Simply give a possibility to "ref in" allowing use rvalues. That has already been rejected. Then we

Re: auto ref is on the docket

2015-06-24 Thread Namespace via Digitalmars-d
On Wednesday, 24 June 2015 at 09:54:01 UTC, Jonathan M Davis wrote: On Wednesday, 24 June 2015 at 09:26:49 UTC, Temtaime wrote: Simply give a possibility to "ref in" allowing use rvalues. That has already been rejected. - Jonathan M Davis How many times did I say that already? :)

Re: auto ref is on the docket

2015-06-23 Thread Namespace via Digitalmars-d
On Tuesday, 23 June 2015 at 01:01:26 UTC, Andrei Alexandrescu wrote: On 6/22/15 4:09 PM, Timon Gehr wrote: There is no reason to prevent templates from using the mechanism that generates only one copy. The two mechanisms shouldn't share the same syntax, because then there is no way to tell them

Re: auto ref is on the docket

2015-06-22 Thread Namespace via Digitalmars-d
On Monday, 22 June 2015 at 20:42:58 UTC, Daniel N wrote: On Monday, 22 June 2015 at 05:25:57 UTC, Walter Bright wrote: The idea is that fun(5) would be lowered to: auto tmp = 5; fun(tmp); But when talking to Andrei I didn't realize that it would be subtly different behavior than 'auto r

Re: auto ref is on the docket

2015-06-22 Thread Namespace via Digitalmars-d
On Monday, 22 June 2015 at 18:03:43 UTC, Temtaime wrote: I see no reasons why « ref in » is bad. Maybe someone explain ? It's also natural for those who came from C++. In C++ there's no problem with const&, so why they will be in D? Because const is transitive in D and therefore more restrictiv

Re: auto ref is on the docket

2015-06-22 Thread Namespace via Digitalmars-d
We had this discussion already with DIP 36. A PR still exists AFAIK, but because it was rejected I don't think that's going to happen. :) So auto ref is obviously the choice. If you insist on scope/in ref, please make your own thread and ask why it was rejected or read the corresponding thread.

Re: auto ref is on the docket

2015-06-22 Thread Namespace via Digitalmars-d
Rather than raising the matter of scope again and again, we should be thankful that a solution for this nasty problem is accepted and could be merged. How scope and escape analysis could do a better job is unclear and if you want to solve the problem this way you will wait a very long time. So

Re: Time to remove ugly auto ref ?

2015-06-19 Thread Namespace via Digitalmars-d
On Friday, 19 June 2015 at 16:53:26 UTC, Andrei Alexandrescu wrote: On 6/19/15 9:14 AM, Namespace wrote: On Friday, 19 June 2015 at 14:49:59 UTC, bitwise wrote: On Fri, 19 Jun 2015 08:28:17 -0400, Namespace wrote: I've made a PR: https://github.com/D-Programming-Language/dmd/pull

Re: Time to remove ugly auto ref ?

2015-06-19 Thread Namespace via Digitalmars-d
On Friday, 19 June 2015 at 14:49:59 UTC, bitwise wrote: On Fri, 19 Jun 2015 08:28:17 -0400, Namespace wrote: I've made a PR: https://github.com/D-Programming-Language/dmd/pull/4717 What's the holdup on this anyways? Bit I've pinged him already two times, but no

Re: Time to remove ugly auto ref ?

2015-06-19 Thread Namespace via Digitalmars-d
On Friday, 19 June 2015 at 12:34:49 UTC, Temtaime wrote: Hi ! I think that's great but isn't it better to use « ref in » instead ? Search for DIP 36 and look what the decision was.

Re: Time to remove ugly auto ref ?

2015-06-19 Thread Namespace via Digitalmars-d
I've made a PR: https://github.com/D-Programming-Language/dmd/pull/4717

Re: What's the ETA for 2.068?

2015-06-17 Thread Namespace via Digitalmars-d
On Wednesday, 17 June 2015 at 17:38:03 UTC, weaselcat wrote: On Thursday, 11 June 2015 at 06:26:31 UTC, weaselcat wrote: last I read was "after dconf," seems martin created a PR to branch 2.068, so I guess "Soon." It is delayed: http://forum.dlang.org/post/5581be03.5070...@erdani.org

Re: rvalue references

2015-06-12 Thread Namespace via Digitalmars-d
On Friday, 12 June 2015 at 19:39:25 UTC, Stewart Gordon wrote: On 09/06/2015 13:14, Namespace wrote: What does this have to do with "garbage-collected language"? If I have a big struct, e.g. struct Matrix { float[16] values = [...]; } I always want to pass it by ref

Re: rvalue references

2015-06-09 Thread Namespace via Digitalmars-d
No opinions on the semantics for `in` I proposed earlier? `in T` would be something like a non-escapable `const auto ref T` accepting rvalues without codebloat and avoiding the indirection for small POD types T. Wouldn't that eliminate 99% of the use cases for `auto ref`, improve readability s

Re: rvalue references

2015-06-09 Thread Namespace via Digitalmars-d
On Tuesday, 9 June 2015 at 11:04:43 UTC, Stewart Gordon wrote: Apologies if I've missed something - I haven't had much time to keep up with the discussions lately. What is the use case for rvalue references in a garbage-collected language? To me, it sounds like people want this feature for D

Re: rvalue references

2015-06-09 Thread Namespace via Digitalmars-d
On Monday, 8 June 2015 at 22:58:15 UTC, bitwise wrote: On Mon, 08 Jun 2015 16:17:33 -0400, Namespace wrote: Yes, the same goes for Dgame. closed-source projects can also accept rvalue-refs now ;) Bit Dgame is not closed-source. ;)

Re: rvalue references

2015-06-08 Thread Namespace via Digitalmars-d
One useful case for me: static Mat4 transform()(const auto ref Vec3 pos, const auto ref Vec3 scale, const auto ref Quat rot) { Mat4 m = Mat4(rot.matrix, 1); m.m00 *= scale.x; m.m01 *= scale.x; m.m02 *= scale.x; m.m10 *= scale.y; m.m11 *= scale.y; m.m12 *= scale.y;

Re: rvalue references

2015-06-07 Thread Namespace via Digitalmars-d
On Sunday, 7 June 2015 at 18:40:42 UTC, bitwise wrote: On Sat, 06 Jun 2015 14:05:54 -0400, Namespace wrote: Finally all green! Now we need a review. You're my hero. Bit Sounds ironic. o.O

Re: rvalue references

2015-06-06 Thread Namespace via Digitalmars-d
Finally all green! Now we need a review.

Re: rvalue references

2015-06-05 Thread Namespace via Digitalmars-d
On Friday, 5 June 2015 at 21:31:22 UTC, Namespace wrote: I start working on a Pull (https://github.com/D-Programming-Language/dmd/pull/4717), but it fails the first check. The reason seems to be this: https://github.com/D-Programming-Language/dmd/pull/4717/files#diff

Re: rvalue references

2015-06-05 Thread Namespace via Digitalmars-d
I start working on a Pull (https://github.com/D-Programming-Language/dmd/pull/4717), but it fails the first check. The reason seems to be this: https://github.com/D-Programming-Language/dmd/pull/4717/files#diff-ffafa03255a57832dd09031af6cb915dR5945 I guess that this error happens because I canno

Re: rvalue references

2015-06-03 Thread Namespace via Digitalmars-d
On Wednesday, 3 June 2015 at 10:07:41 UTC, Marc Schütz wrote I don't see an argument against `scope ref` in DIP36, quite the opposite... I know I was one of the authors. But it was rejected.

Re: rvalue references

2015-06-03 Thread Namespace via Digitalmars-d
This code needs to be disallowed under DIP25 (or whatever the final DIP will be), of course. But should work with return ref instead.

Re: rvalue references

2015-06-03 Thread Namespace via Digitalmars-d
On Wednesday, 3 June 2015 at 03:57:38 UTC, bitwise wrote: I forgot to mention, in terms of this statement I made: I can't remember right now what the reasoning was for 'const ref' not to take rvalues in the first place. I think it was that you could escape the reference, but this isn't true a

Re: rvalue references

2015-06-02 Thread Namespace via Digitalmars-d
On Tuesday, 2 June 2015 at 21:20:49 UTC, Andrei Alexandrescu wrote: Yah, auto ref for templates is great. We only need to add auto ref for non-templates with the semantics "like ref, except (a) accepts rvalues on the caller side, (b) does not allow escaping the ref from the function". That woul

Re: rvalue references

2015-06-02 Thread Namespace via Digitalmars-d
3. Add a new attribute - e.g. @rvalue ref - which inserts a temporary variable for rvalues so that they can be passed by ref, and it works with both templated and non-templated functions. We could also somehow use 'return ref' for that purpose, or we could get rid of the pointless 'const scop

Re: rvalue references

2015-06-02 Thread Namespace via Digitalmars-d
auto ref with templated functions needs to retain its current behavior. Changing it would not only break existing code, but it would lose what we have in terms of perfect forwarding (IIRC, it's not quite perfect forwarding, but it's close, and we'd be much farther from it without auto ref). Ok

Re: rvalue references

2015-06-02 Thread Namespace via Digitalmars-d
On Tuesday, 2 June 2015 at 17:22:07 UTC, Marc Schütz wrote: On Tuesday, 2 June 2015 at 16:02:56 UTC, Namespace wrote: Thanks to DIP 25 I think it's time to review this again. I would implement it (if no one else wants to do it), but there are still some unanswered questions: 1. Is 

rvalue references

2015-06-02 Thread Namespace via Digitalmars-d
Thanks to DIP 25 I think it's time to review this again. I would implement it (if no one else wants to do it), but there are still some unanswered questions: 1. Is 'auto ref' still the chosen syntax (I guess so)? 2. Should auto ref for templates act like auto ref for non-templates (creates a t

Re: Negation of attributes (DIP 79)

2015-06-02 Thread Namespace via Digitalmars-d
On Tuesday, 2 June 2015 at 15:18:55 UTC, Dejan Lekic wrote: On Tuesday, 2 June 2015 at 12:13:47 UTC, ref2401 wrote: On Tuesday, 2 June 2015 at 10:29:35 UTC, Daniel Kozak wrote: I am working on dip which will try to addressed negation of attributes issue. http://wiki.dlang.org/DIP79 You propo

Re: Negation of attributes (DIP 79)

2015-06-02 Thread Namespace via Digitalmars-d
On Tuesday, 2 June 2015 at 14:46:47 UTC, ketmar wrote: On Tue, 02 Jun 2015 14:34:10 +, Namespace wrote: from C++? that alone is enough for me to say "burn it with fire!" ;-) Come on, be a little nostalgic. ;)

Re: Negation of attributes (DIP 79)

2015-06-02 Thread Namespace via Digitalmars-d
On Tuesday, 2 June 2015 at 13:39:54 UTC, ketmar wrote: On Tue, 02 Jun 2015 13:16:49 +, Namespace wrote: On Tuesday, 2 June 2015 at 12:21:23 UTC, ketmar wrote: On Tue, 02 Jun 2015 11:50:15 +, Namespace wrote: For me it looks ugly. But I would prefer final(false) instead of !final

Re: Negation of attributes (DIP 79)

2015-06-02 Thread Namespace via Digitalmars-d
On Tuesday, 2 June 2015 at 12:21:23 UTC, ketmar wrote: On Tue, 02 Jun 2015 11:50:15 +, Namespace wrote: For me it looks ugly. But I would prefer final(false) instead of !final. this opens a can of worms. should this be accepted too: enum doItFinal = false; final(doItFinal) ? or even

Re: Negation of attributes (DIP 79)

2015-06-02 Thread Namespace via Digitalmars-d
On Tuesday, 2 June 2015 at 11:07:21 UTC, Liam McSherry wrote: In the examples you give, you could surround the final methods in a final block. Testing with dmd 2.067.1, the following works: --- class C { final { void nonOverrideable() { "Hello, World!".writel

Re: Better handling of noncopyable objects and objects with this(this)

2015-06-01 Thread Namespace via Digitalmars-d
On Monday, 1 June 2015 at 10:18:35 UTC, Jonathan M Davis wrote: On Monday, 1 June 2015 at 04:43:20 UTC, Andrei Alexandrescu wrote: FYI I just created https://issues.dlang.org/show_bug.cgi?id=14638 as one of possibly several language enhancements to improve usability of noncopyable types (most

Re: indie game contests

2015-05-23 Thread Namespace via Digitalmars-d
On Friday, 22 May 2015 at 21:34:27 UTC, Vlad Levenfeld wrote: On Friday, 22 May 2015 at 17:00:06 UTC, Namespace wrote: On Friday, 22 May 2015 at 16:24:18 UTC, Vlad Levenfeld wrote: I know there's a strong gamedev presence here, so I'm wondering if anyone's submitted any games

Re: indie game contests

2015-05-22 Thread Namespace via Digitalmars-d
On Friday, 22 May 2015 at 16:24:18 UTC, Vlad Levenfeld wrote: I know there's a strong gamedev presence here, so I'm wondering if anyone's submitted any games written in D to any of these contests? What was your experience like? I'd like to enter one, and wonder if anyone would be interested i

Re: rvalue references

2015-05-14 Thread Namespace via Digitalmars-d
Don't ask me, I'm just a little light here. But I think it's because 'in' means 'const scope' and as you said, scope is out. ;)

Re: rvalue references

2015-05-14 Thread Namespace via Digitalmars-d
On Thursday, 14 May 2015 at 20:02:29 UTC, bitwise wrote: On Thu, 14 May 2015 13:15:34 -0400, Namespace wrote: On Thursday, 14 May 2015 at 16:53:04 UTC, bitwise wrote: If it were up to me, I would say: 'scope' should be removed as a storage class, 'ref' should be left as

Re: rvalue references

2015-05-14 Thread Namespace via Digitalmars-d
On Thursday, 14 May 2015 at 17:50:35 UTC, Andrei Alexandrescu wrote: On 5/14/15 10:15 AM, Namespace wrote: But interesting question, what will happen with scope, now that we have return ref. Evaluate its merit once we have everything else in. -- Andrei Short and meaningful. Thank you.

Re: rvalue references

2015-05-14 Thread Namespace via Digitalmars-d
On Thursday, 14 May 2015 at 16:53:04 UTC, bitwise wrote: On Thu, 14 May 2015 02:56:46 -0400, Namespace wrote: On Thursday, 14 May 2015 at 00:12:05 UTC, bitwise wrote: Side note: DIP36 seems to be missing the table with the authors, status, etc. Bit Huh, DIP36? DIP36 was rejected

Re: rvalue references

2015-05-14 Thread Namespace via Digitalmars-d
On Thursday, 14 May 2015 at 00:12:05 UTC, bitwise wrote: On Tue, 12 May 2015 08:54:15 -0400, Namespace wrote: As far as I know, the problem (or at least one of the biggest problems) for rvalue references was that they could escape. Since DIP25 is approved and already implemented this

Re: rvalue references

2015-05-13 Thread Namespace via Digitalmars-d
No draft so far?

rvalue references

2015-05-12 Thread Namespace via Digitalmars-d
As far as I know, the problem (or at least one of the biggest problems) for rvalue references was that they could escape. Since DIP25 is approved and already implemented this problem should be solved. Would it be possible to allow rvalues references now? I'm just curious what the mindfactory of

Re: Sneak preview into std.allocator's porcelain

2015-05-07 Thread Namespace via Digitalmars-d
Not what I meant. This is your idea: http://forum.dlang.org/post/l4ccb4$25ul$1...@digitalmars.com Oh, my dream could come true... :)

Re: D needs emplacement new

2015-04-27 Thread Namespace via Digitalmars-d
Since nobody wants to take that work, can at least someone explain me what is going on if I don't reinitialize the memorY? I create 1000 Foo's 1000 times. After the first iteration there are 1000 unused Foo objects and the GC wants to reallocate another 1000 Foo's. Now, what happen? The GC sees

Re: D needs emplacement new

2015-04-26 Thread Namespace via Digitalmars-d
Since I'm unable to rebuild phobos on my Windows 8.1 PC, would someone else be interested, to apply a PR? The code (including comment) would be this: /** Given an existing object $(D obj), reinitialize the object of $(D class) type $(D T) at that address. The constructor is passed the ar

Re: D needs emplacement new

2015-04-25 Thread Namespace via Digitalmars-d
On Saturday, 25 April 2015 at 19:21:28 UTC, weaselcat wrote: On Saturday, 25 April 2015 at 19:16:21 UTC, Namespace wrote: hmm... http://dlang.org/phobos/std_conv.html#.emplace constructs an object of non-class type T at that address. Non-Class. ;) There's a class overload 3 d

Re: D needs emplacement new

2015-04-25 Thread Namespace via Digitalmars-d
hmm... http://dlang.org/phobos/std_conv.html#.emplace constructs an object of non-class type T at that address. Non-Class. ;)

Re: D needs emplacement new

2015-04-25 Thread Namespace via Digitalmars-d
On Saturday, 25 April 2015 at 18:57:13 UTC, Adam D. Ruppe wrote: On Saturday, 25 April 2015 at 18:50:59 UTC, Namespace wrote: Nice name, fits better. But that should be in phobos, don't you think? meh, it might be nice to have, but not being in phobos isn't a big deal to me

Re: D needs emplacement new

2015-04-25 Thread Namespace via Digitalmars-d
On Saturday, 25 April 2015 at 18:46:52 UTC, Adam D. Ruppe wrote: You could just call the constructor again to reuse an object. I guess you should also reinitialize the memory, but that's pretty easy too. Instead of placement new to reuse an object, make a function like reset() or reinitialize

D needs emplacement new

2015-04-25 Thread Namespace via Digitalmars-d
Consider both of these scripts: test_gc_new.d (http://dpaste.dzfl.pl/4f36b165c502) and test_gc_emplace_new.d (http://dpaste.dzfl.pl/ff4e3c35479f) and these results: test_gc_new: test_gc_new.exe "--DRT-gcopt=profile:1" Number of collections: 140 Total GC prep time: 0 millis

Re: Benchmark of D against other languages

2015-04-01 Thread Namespace via Digitalmars-d
On Wednesday, 1 April 2015 at 08:52:06 UTC, bearophile wrote: Andrei Alexandrescu: Oh boy all classes with one-liner non-final methods. Manu must be dancing a gig right now :o). -- Andrei Yes, the right default for D language should be final, because lot of programmers are lazy and they don'

Re: The DMD Download page looks strange

2015-03-25 Thread Namespace via Digitalmars-d
On Wednesday, 25 March 2015 at 12:14:46 UTC, wobbles wrote: http://dlang.org/download.html Each of the download links are semi-overlaid on each other. Tested on the latest Chrome and Firefox on Ubuntu 14.04. With a new release out, I suspect these pages will be used a lot! Oh, I've overlook

Re: A few notes on choosing between Go and D for a quick project

2015-03-13 Thread Namespace via Digitalmars-d
On Friday, 13 March 2015 at 22:14:45 UTC, Walter Bright wrote: On 3/13/2015 12:01 PM, weaselcat wrote: On Friday, 13 March 2015 at 18:55:18 UTC, Walter Bright wrote: On 3/13/2015 3:34 AM, bearophile wrote: "Strict mode" is a D2 with immutable+@safe+pure by default, Note that you can get this

Re: A few notes on choosing between Go and D for a quick project

2015-03-13 Thread Namespace via Digitalmars-d
Yah, we sorely need a way to undo an attribute. BTW "@undo" is short and sweet. -- Andrei I thought reusing keywords is what you like: Example #1: pure: nothrow: // ... some stuff default: // not pure/nothrow Example #2: class Foo { final: // ... default: // virtual //

Re: A few notes on choosing between Go and D for a quick project

2015-03-13 Thread Namespace via Digitalmars-d
On Friday, 13 March 2015 at 19:11:59 UTC, weaselcat wrote: On Friday, 13 March 2015 at 19:03:29 UTC, Namespace wrote: On Friday, 13 March 2015 at 19:01:08 UTC, weaselcat wrote: On Friday, 13 March 2015 at 18:55:18 UTC, Walter Bright wrote: On 3/13/2015 3:34 AM, bearophile wrote: "Strict

Re: A few notes on choosing between Go and D for a quick project

2015-03-13 Thread Namespace via Digitalmars-d
On Friday, 13 March 2015 at 19:01:08 UTC, weaselcat wrote: On Friday, 13 March 2015 at 18:55:18 UTC, Walter Bright wrote: On 3/13/2015 3:34 AM, bearophile wrote: "Strict mode" is a D2 with immutable+@safe+pure by default, Note that you can get this largely by starting a module with the follo

Re: Standard GUI framework inspired by Qt

2015-03-06 Thread Namespace via Digitalmars-d
On Friday, 6 March 2015 at 19:30:14 UTC, Aram wrote: On Thursday, 5 March 2015 at 18:42:56 UTC, Vadim Lopatin wrote: On Thursday, 5 March 2015 at 15:09:55 UTC, Aram wrote: Unfortunately, if it doesn't cover all major PC platforms, it doesn't suit me (Mac OS is not supported). I would like to h

Re: A Refcounted Array Type

2015-02-24 Thread Namespace via Digitalmars-d
On Tuesday, 24 February 2015 at 10:13:36 UTC, matovitch wrote: On Tuesday, 24 February 2015 at 10:11:02 UTC, Namespace wrote: On Tuesday, 24 February 2015 at 10:08:23 UTC, matovitch wrote: On Tuesday, 24 February 2015 at 09:44:13 UTC, Walter Bright wrote: On 2/24/2015 1:32 AM, Jonathan M Davis

Re: A Refcounted Array Type

2015-02-24 Thread Namespace via Digitalmars-d
On Tuesday, 24 February 2015 at 10:08:23 UTC, matovitch wrote: On Tuesday, 24 February 2015 at 09:44:13 UTC, Walter Bright wrote: On 2/24/2015 1:32 AM, Jonathan M Davis via Digitalmars-d wrote: The issue is that delete is considered @safe by the compiler, I thought more people would be intere

Re: Are there any 2D games libraries available for D2?

2015-02-19 Thread Namespace via Digitalmars-d
On Friday, 20 February 2015 at 07:12:34 UTC, Gan wrote: On Friday, 20 February 2015 at 04:52:29 UTC, Jeremy DeHaan wrote: On Friday, 20 February 2015 at 00:07:20 UTC, Kingsley wrote: On Thursday, 19 February 2015 at 23:59:14 UTC, Kingsley wrote: I use Dgame which has a really nice and simple i

Re: Arrays, garbage collection

2015-01-30 Thread Namespace via Digitalmars-d
On Friday, 30 January 2015 at 22:21:15 UTC, Walter Bright wrote: On 1/30/2015 6:54 AM, Andrei Alexandrescu wrote: On 1/30/15 1:29 AM, Foo wrote: Thanks for this code, it's a lot nicer and simpler than mine. -- Andrei I'm going to swipe this for an upcoming presentation I'm doing. Thanks, Fo

Re: Swift does away with pointers == pervasive ARC

2014-06-16 Thread Namespace via Digitalmars-d
On Monday, 16 June 2014 at 17:21:20 UTC, Dicebot wrote: On Monday, 16 June 2014 at 17:12:27 UTC, Benjamin Thaut wrote: Am 16.06.2014 18:23, schrieb Namespace: On Monday, 16 June 2014 at 16:19:55 UTC, Dicebot wrote: On Monday, 16 June 2014 at 15:16:44 UTC, Manu via Digitalmars-d wrote: What

Re: Swift does away with pointers == pervasive ARC

2014-06-16 Thread Namespace via Digitalmars-d
On Monday, 16 June 2014 at 16:19:55 UTC, Dicebot wrote: On Monday, 16 June 2014 at 15:16:44 UTC, Manu via Digitalmars-d wrote: What say you to that, Walter? Apple have committed to pervasive ARC, which you consistently argue is not feasible... Have I missed something, or is this a demonstrati

Re: More useful fixed-size array literals

2014-05-31 Thread Namespace via Digitalmars-d
I remember Kenji is not fond of this []s syntax, for reasons I don't remember. Do you think there are other better/different solutions? Bye, bearophile Read it on my closed Pull Request: https://github.com/D-Programming-Language/dmd/pull/2952 Another attempt was also closed: https://github.c

Re: Optional arguments/parameters

2014-05-28 Thread Namespace via Digitalmars-d
On Wednesday, 28 May 2014 at 11:54:30 UTC, Wanderer wrote: Java misses this feature badly, forcing programmers to copy-paste bloated code (constructor A calls constructor B with fewer arguments, constructor B calls constructor C etc, same thing with methods). Please tell me, does D support this

Re: More from C++ Now 2014

2014-05-19 Thread Namespace via Digitalmars-d
On Sunday, 18 May 2014 at 22:29:04 UTC, bearophile wrote: "Undefined Behavior in C++; what is it, and why should I care": https://github.com/boostcon/cppnow_presentations_2014/blob/master/files/Undefined-Behavior.pdf?raw=true This reminds us to remove as much undefined behavior as possible from

Re: Poll - How long have you been in D?

2014-04-04 Thread Namespace
On Friday, 4 April 2014 at 02:10:15 UTC, dnewbie wrote: Please vote now! http://www.easypolls.net/poll.html?p=533e10e4e4b0edddf89898c5 See also results from previous years: - http://d.darktech.org/2012.png - http://d.darktech.org/2013.png Since 2010

Re: A minor mention of D

2014-03-17 Thread Namespace
On Monday, 17 March 2014 at 12:11:29 UTC, bearophile wrote: Namespace: I couldn't find very much information on how to make games in D [...] They don't know Dgame. :P The point is to make them know. Bye, bearophile The problem is time, there is never enough time... :/ But my

Re: A minor mention of D

2014-03-17 Thread Namespace
I couldn't find very much information on how to make games in D [...] They don't know Dgame. :P

Re: Appropriateness of posts

2014-03-17 Thread Namespace
On Monday, 17 March 2014 at 10:46:47 UTC, Maxim Fomin wrote: On Monday, 17 March 2014 at 10:31:54 UTC, Namespace wrote: On Monday, 17 March 2014 at 09:18:43 UTC, Andrej Mitrovic wrote: On 3/17/14, Walter Bright wrote: I'd hoped I'd never have to post this. There have been some l

Re: Appropriateness of posts

2014-03-17 Thread Namespace
On Monday, 17 March 2014 at 09:18:43 UTC, Andrej Mitrovic wrote: On 3/17/14, Walter Bright wrote: I'd hoped I'd never have to post this. There have been some locker room jokes that continued even after I asked it be stopped. Where? Any specific threads? I think he means the "dlang.sexy" th

  1   2   3   4   5   >