Thread overview | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
May 31, 2013 DConf 2013 Day 2 Talk 3: C# to D by Adam Wilson | ||||
---|---|---|---|---|
| ||||
http://www.reddit.com/r/programming/comments/1feem1/dconf_2013_day_2_talk_3_from_c_to_d_by_adam_wilson/ {Enj,Destr}oy! Andrei |
May 31, 2013 Re: DConf 2013 Day 2 Talk 3: C# to D by Adam Wilson | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Fri, 31 May 2013 13:33:21 +0100, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote: > http://www.reddit.com/r/programming/comments/1feem1/dconf_2013_day_2_talk_3_from_c_to_d_by_adam_wilson/ Excellent talk. Gives us a good idea of the things which are missing for C# conversion and less so in general, and good ideas where to concentrate our efforts. I have old SHA etc hashing routines in old style D, this makes me want to spend some time bringing them up to date... R -- Using Opera's revolutionary email client: http://www.opera.com/mail/ |
May 31, 2013 Re: DConf 2013 Day 2 Talk 3: C# to D by Adam Wilson | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Fri, May 31, 2013 at 6:03 PM, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote: > > {Enj,Destr}oy! Sorry I'm new to D so can anyone please explain that Destroy joke to me? (And I have to say that this is the first -announce list I've seen where all subscribers can post! How come it's allowed here?) -- Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा |
May 31, 2013 Re: DConf 2013 Day 2 Talk 3: C# to D by Adam Wilson | ||||
---|---|---|---|---|
| ||||
On Friday, May 31, 2013 19:06:24 Shriramana Sharma wrote:
> On Fri, May 31, 2013 at 6:03 PM, Andrei Alexandrescu
>
> <SeeWebsiteForEmail@erdani.org> wrote:
> > {Enj,Destr}oy!
>
> Sorry I'm new to D so can anyone please explain that Destroy joke to me?
It's not a D thing. It's an Andrei thing. He likes to tell people to destroy his proposals when he makes them (with the intention that people would point out any problems in them).
- Jonathan M Davis
|
May 31, 2013 Re: DConf 2013 Day 2 Talk 3: C# to D by Adam Wilson | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 5/31/13 8:33 AM, Andrei Alexandrescu wrote: > http://www.reddit.com/r/programming/comments/1feem1/dconf_2013_day_2_talk_3_from_c_to_d_by_adam_wilson/ Hi-def video is now online: http://archive.org/details/dconf2013-day02-talk03 Andrei |
May 31, 2013 Re: DConf 2013 Day 2 Talk 3: C# to D by Adam Wilson | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 05/31/2013 09:33 AM, Andrei Alexandrescu wrote:
> http://www.reddit.com/r/programming/comments/1feem1/dconf_2013_day_2_talk_3_from_c_to_d_by_adam_wilson/
>
> {Enj,Destr}oy!
>
> Andrei
Just watched it over lunch and I liked this talk very much.
For transforming pieces of code I very often write Vim regex, (supports multiline with a flag) and when that is not enough, writing a Vim function does the trick.
About streams: there is some phobos support for streams, though it seems not finalized.
I wish something were done about the containers. Note that it
is very easy to write C# containers in a OOP style, based
on T[] and T[K] internally (though a concurrent hash map with
read/write locking would need to be done from scratch without
using AAs).
It is not true that Array!T is equivalent to List<T>.
Array!T wants to own their items (because it manages its own
memory), so it is only practically useable with structs.
Even duplicating the array is unsafe if the element type
is a class:
import std.stdio, std.container;
class A {
int val;
this(int v) {
val = v;
}
~this() {
writeln("A destroyed");
}
}
void func(Array!A list) {
}
void main() {
A a = new A(3);
Array!A list;
list ~= a;
writeln(a.val); //prints 3
func(list.dup); //prints A destroyed
//<-- The object cannot be used anymore, though it
// is still present in 'list')
writeln(a.val); //prints 0
}
And one cannot use RefCounted!A because RefCounted doesn't
work with classes.
I guess that RedBlackTree's suffer the same problem.
--jm
|
May 31, 2013 Re: DConf 2013 Day 2 Talk 3: C# to D by Adam Wilson | ||||
---|---|---|---|---|
| ||||
Posted in reply to Juan Manuel Cabo | On Friday, May 31, 2013 13:59:24 Juan Manuel Cabo wrote:
> About streams: there is some phobos support for streams, though it seems not finalized.
Everything stream-related which is currently in Phobos is outdated and unacceptable, so it will be replaced. A replacement is in the works, but it's not ready yet.
- Jonathan M Davis
|
May 31, 2013 Re: DConf 2013 Day 2 Talk 3: C# to D by Adam Wilson | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Fri, 31 May 2013 05:33:21 -0700, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote: > http://www.reddit.com/r/programming/comments/1feem1/dconf_2013_day_2_talk_3_from_c_to_d_by_adam_wilson/ > > {Enj,Destr}oy! > > Andrei I want to apologize for the glaring technical error in the talk. I knew about T.init() when I was writing this but I was so focused on finding a analog for C#'s default keyword that it completely slipped my mind. -- Adam Wilson IRC: LightBender Project Coordinator The Horizon Project http://www.thehorizonproject.org/ |
May 31, 2013 Re: DConf 2013 Day 2 Talk 3: C# to D by Adam Wilson | ||||
---|---|---|---|---|
| ||||
Posted in reply to Shriramana Sharma | On Friday, 31 May 2013 at 16:33:45 UTC, Shriramana Sharma wrote:
>
> (And I have to say that this is the first -announce list I've seen
> where all subscribers can post! How come it's allowed here?)
The mailing list is actually an interface to the newsgroup, where discussion has always been encouraged.
|
May 31, 2013 Re: DConf 2013 Day 2 Talk 3: C# to D by Adam Wilson | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | W dniu 31.05.2013 19:05, Jonathan M Davis pisze:
> On Friday, May 31, 2013 13:59:24 Juan Manuel Cabo wrote:
>> About streams: there is some phobos support for streams, though
>> it seems not finalized.
>
> Everything stream-related which is currently in Phobos is outdated and
> unacceptable, so it will be replaced. A replacement is in the works, but it's
> not ready yet.
Do you know any timespans, when it probably will happen? I will be very grateful.
|
Copyright © 1999-2021 by the D Language Foundation