Re: with should be deprecated with extreme prejudice

2009-05-18 Thread Christopher Wright
Steven Schveighoffer wrote: On Mon, 18 May 2009 16:14:29 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Nick Sabalausky wrote: Leandro Lucarella llu...@gmail.com wrote in message news:20090518141908.gb9...@burns.springfield.home... bearophile, el 18 de mayo a las 04:33 me

Re: with should be deprecated with extreme prejudice

2009-05-18 Thread Christopher Wright
Andrei Alexandrescu wrote: Bill Baxter wrote: On Mon, May 18, 2009 at 1:36 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: That's not an equiv of. It's completely missing the point of. Each using costs one new scope and one level of indentation which makes it non-scalable.

Re: OT: on IDEs and code writing on steroids

2009-05-18 Thread Christopher Wright
davidl wrote: From a commercial basis for Walter, it may be easier to glue a C# frontend against the DMD backend to create a native C# compiler. Mono has AOT compilation. On the other hand, I've experienced more ICE per minute with Mono than with dmd. This is partially due to dmd's near

Re: The Final(ize) Challenge

2009-05-18 Thread Christopher Wright
Andrei Alexandrescu wrote: I think you need to operate exclusively with string mixins in Finalize, so __ident would be of marginal help there. Also, static foreach is much more necessary. That is a huge problem. Let's say that the class you want to finalize, Target, has a method like this:

Re: with still sucks + removing features + adding features

2009-05-18 Thread Christopher Wright
bearophile wrote: When I see a syntax like: alias foo bar; I often have troubles understanding if the new name is bar or foo. A syntax like: alias foo as bar; Is less ambigous. Now feel free to go postal :-) The more common suggestion is: alias bar = foo; This has the advantage of looking

Re: the cast mess

2009-05-18 Thread Christopher Wright
grauzone wrote: The worst thing about the current cast(T) operator is that it easily allows reinterpret cast. This is SO NOT SAFE! Especially with arrays, it doesn't do something what the user expects. It's a hidden reinterpret cast. This really should be changed. I use this functionality in

Re: with should be deprecated with extreme prejudice

2009-05-18 Thread Christopher Wright
grauzone wrote: Nick Sabalausky wrote: grauzone n...@example.net wrote in message news:guqrj2$2l7...@digitalmars.com... Here's another simple fix for with(); int x, y; with (whatever) { .y += x; //.y references this is whatever.y ++x; //x references local scope } That

Re: The Final(ize) Challenge

2009-05-18 Thread Christopher Wright
Andrei Alexandrescu wrote: Christopher Wright wrote: Andrei Alexandrescu wrote: I think you need to operate exclusively with string mixins in Finalize, so __ident would be of marginal help there. Also, static foreach is much more necessary. That is a huge problem. Let's say that the class

Re: with still sucks + removing features + adding features

2009-05-18 Thread Christopher Wright
bearophile wrote: Christopher Wright: The more common suggestion is: alias bar = foo; This is acceptable, thank you :-) Now I'd like to know what others think about that. Bye, bearophile Why thank me? It's been batted around a few times, and it was not my suggestion originally.

Re: JSON in D

2009-05-17 Thread Christopher Wright
Fawzi Mohamed wrote: As we are about JSON blip has also one. It does not aim at replacing tango's one, which is really fast, and is the way to go if you want to read JSON to an in memory representation of it. On the other hand if you want to use JSON for serialization, i.e. to read into

Re: OT: on IDEs and code writing on steroids

2009-05-17 Thread Christopher Wright
Ary Borenszweig wrote: BCS escribió: Hello Georg, So, in a way, Microsoft may be right in assuming that (especially when their thinking anyway is that everybody sits at a computer that's totally dedicated to the user's current activity anyhow) preposterous horse power is (or, should be)

Re: OT: on IDEs and code writing on steroids

2009-05-16 Thread Christopher Wright
Georg Wrede wrote: If we were smart with D, we'd find out a way of leapfrogging this thinking. We have a language that's more powerful than any of C#, Java or C++, more practical than Haskell, Scheme, Ruby, co, and more maintainable than C or Perl, but which *still* is Human Writable. More

Re: assignment: left-to-right or right-to-left evaluation?

2009-05-16 Thread Christopher Wright
Georg Wrede wrote: bearophile wrote: Georg Wrede: arra[i] = arrb[i++]; arra[i++] = arrb[i]; I'm not sure that such dependences are good code. By stating a definite order between lvalue and rvalue, you would actually encourage this kind of code. I agree that putting such things in code is

Re: Please Vote: Exercises in TDPL?

2009-05-16 Thread Christopher Wright
Don wrote: grauzone wrote: Incidentally, here, or in D.learn, somebody was asking for symbolic derivation with D templates. I think one of the excercises in SICP was to write a lisp snippet that did just that. Awesome stuff, through and through. An awesome way to hit compiler bugs, huh?

Re: Please Vote: Exercises in TDPL?

2009-05-16 Thread Christopher Wright
Daniel Keep wrote: Better than having a crash with OPTLINK with no error message nor indication of what the problem is, where the only reproducible test case is 2MB worth of object files and which has already cost you four days of trying fruitlessly to work around it, still without a solution.

Re: Please Vote: Exercises in TDPL?

2009-05-15 Thread Christopher Wright
Andrei Alexandrescu wrote: Sean Kelly wrote: Brad Roberts wrote: There's only one book that I can remember ever working through the exercises on.. and that's even a stretch of the term exercise: Exceptional C++. For any of you that develop c++ code and haven't read that book.. I highly

Re: A case for opImplicitCast: making string search work better

2009-05-15 Thread Christopher Wright
downs wrote: Consider this type: struct StringPosition { size_t pos; void opImplicitCast(out size_t sz) { sz = pos; } void opImplicitCast(out bool b) { b = pos != -1; } } Wouldn't that effectively sidestep most problems people have with find returning -1? Or am I missing

Re: JSON in D

2009-05-15 Thread Christopher Wright
Sean Kelly wrote: == Quote from Steve Teale (steve.te...@britseyeview.com)'s article I'm trying to write a JSON parser/generator. If anyone else is doing the same, can we collaborate? I've got one, but I wrote it for work so I'm not sure if I can release it. I'd be happy to offer

Re: Please Vote: Exercises in TDPL?

2009-05-15 Thread Christopher Wright
Nick Sabalausky wrote: Sean Kelly s...@invisibleduck.org wrote in message I also don't understand why professors seem to always choose academic textbooks on the subject when I know there are infinitely better trade books available (which I generally already own). Hear hear!! There's also

Re: struct opCmp?

2009-05-15 Thread Christopher Wright
Frits van Bommel wrote: Nick Sabalausky wrote: Can anyone think of a reasonable case where it would actually make sense to override opCmp, but not opEquals? (that is, without bastardizing them like in a C++ streams kind of way) How about a struct you want to be opCmp()-comparable (which,

Re: [static] [shared] [const|immutable]

2009-05-14 Thread Christopher Wright
Lionello Lunesu wrote: I like shared/const/immutable as much as the next guy, but there are now 2x2x3=12 ways to decorate a variable. Furthermore, by either declaring the variable globally or locally (stack), we end up with 24 possible declaration. See the code at the end of this post. The

Re: [static] [shared] [const|immutable]

2009-05-14 Thread Christopher Wright
Lionello Lunesu wrote: Christopher Wright dhase...@gmail.com wrote in message news:gugs7b$70...@digitalmars.com... Lionello Lunesu wrote: I like shared/const/immutable as much as the next guy, but there are now 2x2x3=12 ways to decorate a variable. Furthermore, by either declaring

Re: D users in Munich, Rome, Venice, or Frankfurt?

2009-05-13 Thread Christopher Wright
BCS wrote: Hello Derek, On Wed, 13 May 2009 01:04:19 + (UTC), BCS wrote: Ah! One of my favorite qwerks of the English language, how to refer to a specific single someone of unknown gender without insulting them: it? I hate it but what can I do? Use they. Sure, its wrong but everyone

Re: When will D1 be finished?

2009-05-13 Thread Christopher Wright
Andrei Alexandrescu wrote: If this is important to you, wouldn't it be more appropriate to look into making the patch complete instead of complaining about it? Andrei The poster of the patch believes it to be complete. Walter looks at it and believes that it is not. It adds perhaps one

Re: Wrt. threadlocal by default: shared module constructors

2009-05-13 Thread Christopher Wright
Brad Roberts wrote: An interesting side effect of these changes is that thread startup cost is going to increase. Yet more reasons to avoid globals and global initialization. -- Brad It'll further promote use of threadpools. This isn't terribly safe because the globals for that thread are

Re: dmd 1.045 / 2.030 release

2009-05-12 Thread Christopher Wright
Leandro Lucarella wrote: Walter Bright, el 12 de mayo a las 09:40 me escribiste: Tomas Lindquist Olsen wrote: Is there a reason for the missing announcement ? Yes, I sent it to people who'd asked for a prerelease so they could check their builds against it. I think a better way to do

Re: When will D1 be finished?

2009-05-12 Thread Christopher Wright
Georg Wrede wrote: Derek Parnell wrote: I am not saying that D1 is not finished, but I am saying that DMD-v1 is not finished. D1 documentation says X is a function of D1. DMD-v1 does not implement X. Therefore DMD-v1 is not a complete implementation of D1. Even though D1 is

Re: assignment: left-to-right or right-to-left evaluation?

2009-05-12 Thread Christopher Wright
Michiel Helvensteijn wrote: Jarrett Billingsley wrote: It's incredibly rare that I have to assign the same value to multiple targets, and when I do, the little time I could save by not typing the second assignment is offset by the increased time it takes me to look for assignments to a

Re: project oriented

2009-05-12 Thread Christopher Wright
davidl wrote: The module package system still stays in the state of the C age. It's file oriented. I think there's no more sound package system than C# one. The namespace and distributed packaging is a must nowadays and the compiler should be project oriented and take project information as

Re: Overriding Private

2009-05-12 Thread Christopher Wright
dsimcha wrote: == Quote from Christopher Wright (dhase...@gmail.com)'s article dsimcha wrote: Is there any hack in D that will allow overriding of privacy settings on classes? For example, I really need a feature that will force D to let me mess with the internals of a class that I have

Re: When will D1 be finished?

2009-05-12 Thread Christopher Wright
Walter Bright wrote: Luís Marques wrote: Two years ago, I tried to use a particular construct and DMD incorrectly detected that a statement was not reachable [1]. OK, D1 had been frozen earlier that year, so I thought it would be only a matter of time until the higher priority stuff had been

Re: When will D1 be finished?

2009-05-12 Thread Christopher Wright
Walter Bright wrote: Christopher Wright wrote: However, if a patch exists, there is only one excuse for not including it: lack of testing. And there is one huge reason that nobody submits additional test cases to your DMD test suite -- you've never released it, or even specified

Re: What's the current state of D?

2009-05-12 Thread Christopher Wright
Georg Wrede wrote: Knowing what (*seriously excuse* the wording here) fascists the FSF guys are, they obviously assume similar behavior of any opposition. That explains why they appear paranoid and unreasonable in their demands of the copyright statements for any code even remotely considered

Re: 3 variant questions

2009-05-11 Thread Christopher Wright
Saaa wrote: Christopher Wright dhase...@gmail.com wrote in message news:gu8v1b$1ut...@digitalmars.com... Saaa wrote: How do I return a variant type in D1? After assessing that a variadic argument is an array, how do I check its depth? How do I set the variable given to me through

Re: What's the current state of D?

2009-05-10 Thread Christopher Wright
torhu wrote: On 10.05.2009 00:05, mpt wrote: I keep making 2 mistakes in my D programs, and fixing them feels troublesome. 1. Null references. I get a segfault and gdb is useless (ldc thing maybe). 2. Exceptions. It prints the msg nicely, but it's unhelpful in tracing the real cause of

Re: What's the current state of D?

2009-05-10 Thread Christopher Wright
Nick Sabalausky wrote: About the null references, most people seem to agree that the right way to fix that is with some sort of non-nullable. But there's a lot of disagreement on exactly how non-nullables should work. And whether they *can* work. D2 has struct constructors, so structs can

Re: SCHEDULED for deprecation

2009-05-10 Thread Christopher Wright
Tomasz Sowi#324;ski wrote: This phrase gave me an idea for a small feat: deprecated(2009-4-19) void foo(); Compiling references to the deprecated declaration *before* the deprecation date would result in a *warning*. Compiling the deprecated declaration OR any reference to it *after* the date

Re: std.random:uniform - uncompilable example from docs

2009-05-10 Thread Christopher Wright
Tyro[a.c.edwards] wrote: http://www.digitalmars.com/d/2.0/phobos/std_random.html#uniform Above documentation provides the following example: Random gen(unpredictableSeed); // Generate an integer in [0, 1023] auto a = uniform(0, 1024, gen); // Generate a float in [0, 1)

Re: What's the current state of D?

2009-05-09 Thread Christopher Wright
torhu wrote: On 09.05.2009 00:29, Christopher Wright wrote: Open source projects tend to have to support wider ranges of compilers. I've seen OSS projects where they prioritized issues specific to gcc-3.4.2 as highly as any other issue, even if the developers typically used the 4.x branch

Re: What's the current state of D?

2009-05-09 Thread Christopher Wright
Tyro[a.c.edwards] wrote: On 5/9/2009 11:24 AM, grauzone wrote: beyond and I'm quite sure that I'm not the only one. For all the Naysayers out there... Keep saying nay and go the hell away. D2 is just where it is supposed to be. Let’s not end up in the same mess we did by trying to make

Re: What's the current state of D?

2009-05-08 Thread Christopher Wright
Steve Teale wrote: This is the sort of answer that will kill D. The guy comes back after 2 years, asks a straight question, and get's told business as usual, we're still arguing among ourselves about what it should be. Last week I asked Andrei what DMD2/Phobos to use, looking for something

Re: Many questions

2009-05-06 Thread Christopher Wright
Denis Koroskin wrote: On Wed, 06 May 2009 02:36:21 +0400, Christopher Wright dhase...@gmail.com wrote: I see no use case for having one module in multiple files, though -- the only benefit would be private access to things defined in other files. I've never been big on making stuff private

Re: D styled data format, Json failed

2009-05-06 Thread Christopher Wright
Saaa wrote: My first stab at the get function. As you might see, I need help :D Thanks! How do I make the function take a variadic argument and get its type? void get(in char[][] file, in char[] identifier, ...) { TypeInfo type = _arguments[0]; void* var = _argptr; //

Re: Slide design

2009-05-05 Thread Christopher Wright
Simen Kjaeraas wrote: On Mon, 04 May 2009 20:47:10 +0200, Sean Kelly s...@invisibleduck.org wrote: == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article I don't agree. I think there is much more at work here. Slides are limited in size and text content simply because

Re: Many questions

2009-05-05 Thread Christopher Wright
Georg Wrede wrote: Yigal Chripun wrote: *but*, I do think that splitting one file that got too big over time or uniting a bunch of small files into one should be possible. This would be especially good for us. D is mainly developed by individuals, and there projects tend to grow organically

Re: Many questions

2009-05-05 Thread Christopher Wright
grauzone wrote: Christopher Wright wrote: It *is* possible, by use of public imports. Are you splitting one file into many? Public import the other modules. Are you merging many files into one? Leave the other files with just a public import of the merged file. Nice story. In reality you

Re: Many questions

2009-05-04 Thread Christopher Wright
Fractal wrote: That's debatable. The hateful thing about namespaces is that they give you absolutely ZERO clue as to where any particular thing is coming from. If I see tango.io.device.File, I know exactly where the source for that module is. -- Daniel Yes it is true. But the thing is not

Re: Throwable, Exception, and Error

2009-05-03 Thread Christopher Wright
Frank Benoit wrote: Walter Bright schrieb: Steve Teale wrote: If I want a catch-all catch, which should I be using. Out of habit I use Exception, but if I do that then I will miss some things thrown from Phobos. Is it the intention that Throwable be used for this purpose? Yes. Why is it

Re: Throwable, Exception, and Error

2009-05-03 Thread Christopher Wright
Steve Teale wrote: Christopher Wright Wrote: Frank Benoit wrote: Walter Bright schrieb: Steve Teale wrote: If I want a catch-all catch, which should I be using. Out of habit I use Exception, but if I do that then I will miss some things thrown from Phobos. Is it the intention

Re: line drawing package?

2009-05-03 Thread Christopher Wright
BCS wrote: I find my self in need of a line drawing package. I need to pop a window and draw lines and points. Text would be nice but I can live without it. Most importantly, I need something that is dirt simple to get running. I don't have time to dink around with libs (if I did have time I'd

Re: C tips (again)

2009-05-02 Thread Christopher Wright
superdan wrote: Steve Teale Wrote: bearophile Wrote: So I agree with nearly nothing you have (badly) expressed. Bye, bearophile Who is this guy? He must be putting his messages through one of those web sites that translate into strange dialects - fry my ass! fer tat i recommend da

Re: I wish I could use D for everything

2009-05-01 Thread Christopher Wright
Derek Parnell wrote: On Thu, 30 Apr 2009 13:23:52 -0400, superdan wrote: (actually who cares what he wrote ...) superdan, when you grow up I'm certain that you will be an important person. I just hope we don't have to wait too long. On those occasions on which I've read a post by superdan,

Re: I wish I could use D for everything

2009-05-01 Thread Christopher Wright
dsimcha wrote: == Quote from Brad Roberts (bra...@puremagic.com)'s article dsimcha wrote: D2 is a complex language, but it's not complex in a haphazard way. It's complex because it statically proves stuff about your code (const, etc), and allows extremely powerful, generic user-defined

Re: I wish I could use D for everything

2009-04-30 Thread Christopher Wright
Steven Schveighoffer wrote: I can't wait for D to take over the world, so I no longer have to write in this horrid language ;) C# is pretty reasonable. I see a fair number of things in recent versions that have been in D for a while, and some other vaguely neat things that D doesn't have on

Re: I wish I could use D for everything

2009-04-30 Thread Christopher Wright
Unknown W. Brackets wrote: I'm lucky, I'm a technical lead/manager at work, so I get to say for this project, we're using D. And then it happens. Muhahaha. We're a small shop but I enjoy my small amount of power. I could do that, but D is lacking essentials for me: - a message bus that

Re: RFC: naming for FrontTransversal and Transversal ranges

2009-04-30 Thread Christopher Wright
Rainer Deyke wrote: Andrei Alexandrescu wrote: 1. Value semantics (arrays are like int) Don't forget: + Supports timely destruction of contents (i.e. RAII). These are collections. RAII doesn't matter when you have a garbage collector and the only resource you have is memory, unless you're

Re: I wish I could use D for everything

2009-04-30 Thread Christopher Wright
Andrei Alexandrescu wrote: There have been quite a few bugs in the I/O functions because the infrastructure underneath them has gone through a few major revisions. As Don said, D2 is an alpha and it cannot be held to the stability standards of a finished product. Then I should wait a few

Re: RFC: naming for FrontTransversal and Transversal ranges

2009-04-30 Thread Christopher Wright
Rainer Deyke wrote: Christopher Wright wrote: Rainer Deyke wrote: Don't forget: + Supports timely destruction of contents (i.e. RAII). These are collections. RAII doesn't matter when you have a garbage collector and the only resource you have is memory, unless you're quite strapped

Re: I wish I could use D for everything

2009-04-30 Thread Christopher Wright
Robert Fraser wrote: Christopher Wright wrote: - a mock object library that doesn't force me to gouge my eyes out (which I could probably do by now) - an ORM library comparable to NHibernate http://www.dsource.org/projects/dmocks Not sure if the Sleeper is comparable to NHibernate, but my

Re: D-styled data file

2009-04-29 Thread Christopher Wright
Saaa wrote: If the JSON writer won't write every item (which will be thousands of items) on a new line and reading in multi arrays, then I think I need to witch to Tango :D Tango's JSON printer has options for pretty-printing and condensed printing. The default is condensed; everything will

Re: D-styled data file

2009-04-29 Thread Christopher Wright
Saaa wrote: Christopher Wright dhase...@gmail.com wrote in message news:gtb02h$e4...@digitalmars.com... Saaa wrote: If the JSON writer won't write every item (which will be thousands of items) on a new line and reading in multi arrays, then I think I need to witch to Tango :D Tango's JSON

Re: Titanion 0.4

2009-04-28 Thread Christopher Wright
Moritz Warning wrote: Titanion is a 2.5D shooter game for Windows, *nix and MacOSX. The original code by Kenta Cho was ported to use Tango and Derelict. This made it possible to create binaries for different platforms and is what this 0.4 release is about. The code was also put on

Re: Keyword 'dynamic' of C#4

2009-04-28 Thread Christopher Wright
Unknown W. Brackets wrote: I read until I hit this: 4. if (Maino__SiteContainer0.p__Site1 == null) And I was suddenly hit with a huge feeling of I'm glad D doesn't look like this. Seriously, I hope this is some sort of decompiled syntax and not actually valid. It's decompiled: This

Re: dmd 2.029 release

2009-04-27 Thread Christopher Wright
Walter Bright wrote: Georg Wrede wrote: Walter Bright wrote: Lutger wrote: what the hell...this code can't be human. I was replaced by Colossus years ago. Michael A. Jackson wouldn't approve 1175 gotos in 113 files. I see I was being too obscure. See Colossus, the Forbin Project

Re: Why is utf8 the default in D?

2009-04-27 Thread Christopher Wright
Frank Benoit wrote: M$ and Java have chosen to use utf16 as their default Unicode character encoding. I am sure, the decision was not made without good reasoning. What are their arguments? Why does D propagate utf8 as the default? Unicode did not match ISO10646 when Java and Windows

Re: Yet another strike against the current AA implementation

2009-04-27 Thread Christopher Wright
Simen Kjaeraas wrote: Andrei Alexandrescu wrote: Georg Wrede wrote: There's an illusion. And that illusion comes from the D newsgroups having wrong names. The D2 newsgroup should have a name like D2 discussion -- for D language development folks, enter at your own risk. And a *D1*

Re: Phobos2: sorting and std.typecons.Tuple

2009-04-27 Thread Christopher Wright
Andrei Alexandrescu wrote: bearophile wrote: Andrei Alexandrescu: s/recursive/transitive/ Litmus test: recursive could recurse forever. Transitive never does. I have used the word recursive because the functions I have designed (and I think they are designed correctly) call themselves until

Re: If T[new] is the container for T[], then what is the container for T[U]?

2009-04-26 Thread Christopher Wright
Andrei Alexandrescu wrote: Christopher Wright wrote: Simple solution: put the array definition in object.d and try implementing arrays with reference counting or manual memory management. I think stored slices break manual memory management, even with a dedicated slice type; but they should

Re: Yet another strike against the current AA implementation

2009-04-26 Thread Christopher Wright
Andrei Alexandrescu wrote: 2. I haven't measured, but the cost of the indirect call is large enough to make me suspect that opApply is not as efficient as it's cracked to be, even when compared with an iterator. When you know the type beforehand or can use templates, that is, rather than

Re: If T[new] is the container for T[], then what is the container for T[U]?

2009-04-25 Thread Christopher Wright
Andrei Alexandrescu wrote: It looks we can't make it with only T[]. Citation needed. If this is a continuation of a previous discussion, a link to the previous discussion will suffice. I grant that appending to an array is expensive. Make Array a user-defined type and we can see what's

Re: If T[new] is the container for T[], then what is the container for T[U]?

2009-04-25 Thread Christopher Wright
Robert Jacques wrote: On Sat, 25 Apr 2009 18:04:32 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Robert Jacques wrote: 1) In what way would it help to give the owner an identity? For example, on an implementation that doesn't want gc, they'd need the owner for

Re: dmd 2.029 release [OT]

2009-04-24 Thread Christopher Wright
BCS wrote: I guess if you really hate having it not kill the app then the program could just not /have/ a x button. Your window manager does not support such windows.

Re: dmd 2.029 release

2009-04-23 Thread Christopher Wright
Andrei Alexandrescu wrote: Yes. The way it should be is not with sink, but with the standard output iterator method put(). void streamOut(T, R)(T object, R range) { foreach(x; a) range.put(x); range.put(b); range.put(c); } // object.d class Object { void streamOut(R)(R

Re: -nogc

2009-04-23 Thread Christopher Wright
Andrei Alexandrescu wrote: I've discussed something with Walter today and thought I'd share it here. The possibility of using D without a garbage collector was always looming and has been used to placate naysayers (you can call malloc if you want etc.) but that opportunity has not been realized

Re: -nogc

2009-04-23 Thread Christopher Wright
Andrei Alexandrescu wrote: Christopher Wright wrote: This means replacing a mark/sweep GC with a reference counting GC. It just means that certain types and constructs are rewritten. The exact strategy depends on how Ref, Array, and AssocArray are defined. Probably a good approach

Re: ACCU conference

2009-04-22 Thread Christopher Wright
Georg Wrede wrote: Walter Bright wrote: I'm off to speak at it! http://accu.org/index.php/conferences/accu_conference_2009/accu2009_speakers Next time you come over to the Old World, why not fly back a day later. Then a few of us might get together. A mini D-meeting wouldn't hurt. It

Re: Fully dynamic d by opDotExp overloading

2009-04-20 Thread Christopher Wright
Michel Fortin wrote: On 2009-04-20 07:25:43 -0400, Christopher Wright dhase...@gmail.com said: BCS wrote: Hello Christopher, The utility is when you are looking for methods to invoke via runtime reflection, you can determine that a given function is one of these runtime opDotExp equivalents

Re: GC object finalization not guaranteed

2009-04-19 Thread Christopher Wright
Daniel Keep wrote: Walter Bright wrote: Leandro Lucarella wrote: Close a connection gracefully for example, I guess (I mean, send a bye packed, not just close the socket abruptly). Same for closing files writing some mark or something. They can be risky when finalization is not deterministic

Re: Fully dynamic d by opDotExp overloading

2009-04-19 Thread Christopher Wright
Michel Fortin wrote: The thing is that the name of that catchAllHandlerFunc function needs to be standardised for it to work with runtime reflection. I agree with this wholeheartedly. However, opDotExp would be hamstringed if it were made to serve this function. Since classes can implement

Re: Fully dynamic d by opDotExp overloading

2009-04-19 Thread Christopher Wright
Andrei Alexandrescu wrote: Michel Fortin wrote: On 2009-04-18 22:21:50 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: I did, but sorry, it doesn't make sense and does nothing but continue the terrible confusion going in this thread. Then let's try to remove some of that

Re: What does this linker messages try to tell me?

2009-04-19 Thread Christopher Wright
Frank Benoit wrote: OPTLINK (R) for Win32 Release 8.00.1 Copyright (C) Digital Mars 1989-2004 All rights reserved. C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.core.databinding.lib(AbstractObservableList) Offset F0567H Record Type 00C3 Error 1: Previous Definition Different :

TypeInfoEx: it's here!

2009-04-18 Thread Christopher Wright
Hello everyone, I have created TypeInfoEx, a clone of Jascha Wetzel's ClassInfoEx. Quick info: Support: D2 / Phobos License: any license that is used by Phobos or Tango Status: alpha at best Download: svn co http://felt-project.org/reflect/trunk Bugs: - The type 'real' is not supported. (fst

Re: Fully dynamic d by opDotExp overloading

2009-04-18 Thread Christopher Wright
Steven Schveighoffer wrote: On Fri, 17 Apr 2009 21:54:52 -0400, Steven Schveighoffer schvei...@yahoo.com wrote: Andrei wrote: We are discussing a language extension. That language extension will allow a type to choose flexibility in defining methods dynamically, while being otherwise

Re: Fully dynamic d by opDotExp overloading

2009-04-18 Thread Christopher Wright
Don wrote: Steven Schveighoffer wrote: On Fri, 17 Apr 2009 21:54:52 -0400, Steven Schveighoffer schvei...@yahoo.com wrote: Andrei wrote: We are discussing a language extension. That language extension will allow a type to choose flexibility in defining methods dynamically, while being

Re: Fully dynamic d by opDotExp overloading

2009-04-18 Thread Christopher Wright
Nick Sabalausky wrote: Christopher Wright dhase...@gmail.com wrote in message news:gsb05g$2in...@digitalmars.com... Assuming that you are testing the logic of your application, you will trivially check things like accessing legnth rather than length -- under the assumption that these two

Re: Fully dynamic d by opDotExp overloading

2009-04-18 Thread Christopher Wright
Daniel Keep wrote: Cool! I suggest the rewrite: c.unknownmethod(args) - c.opDotExp!(unknownmethod)(args) That way you have the option of handling the method name statically or dynamically. Careful. If you do that, you need to make sure it's possible to invoke a given method at runtime.

Re: Fully dynamic d by opDotExp overloading

2009-04-18 Thread Christopher Wright
bearophile wrote: Andrei Alexandrescu: Yes. The amount of confusion in this thread is staggering. I think I have misunderstood about the whole thread then. If the string isn't determined at run time, then this thing isn't useful for my purposes, and it's not close to the object-C as I was

Re: GC object finalization not guaranteed

2009-04-18 Thread Christopher Wright
Walter Bright wrote: Leandro Lucarella wrote: You missed the point. I'm not talking about freeing the memory. I'm talking about finalizers. A finalizer could send a bye packet throgh the net. That can't be handled by the OS. That shouldn't be handled by a finalizer. A bye packet can be

Re: Fully dynamic d by opDotExp overloading

2009-04-17 Thread Christopher Wright
Andrei Alexandrescu wrote: Cool! I suggest the rewrite: c.unknownmethod(args) - c.opDotExp!(unknownmethod)(args) That way you have the option of handling the method name statically or dynamically. How would that allow you to handle the method name dynamically, if you're passing it as a

Re: Fully dynamic d by opDotExp overloading

2009-04-17 Thread Christopher Wright
Andrei Alexandrescu wrote: Yah, glad someone mentioned it :o). The best way is a blend - you can statically dispatch on some popular/heavily-used names, then rely on a hashtable lookup for dynamic stuff. Andrei You suggest: auto opDotExp(string name)(...) { static if (name ==

Re: Fully dynamic d by opDotExp overloading

2009-04-17 Thread Christopher Wright
Nick Sabalausky wrote: davidl dav...@nospam.org wrote in message news:op.usje9ia3j5j...@my-tomato... The benefit is you don't need to write the call function, ...But you do have to write the opDotExp() function. How is that less work than just writing a dispatch function? It's more work,

Re: Fully dynamic d by opDotExp overloading

2009-04-17 Thread Christopher Wright
Andrei Alexandrescu wrote: I think there's merit in binding via strings. It makes for very flexible code that is future-proof, dynamic-linking-friendly, and hot-swappable without recompiling (e.g. you don't need to recompile because you now implement an interface etc.) Reflection is very

Re: Fully dynamic d by opDotExp overloading

2009-04-17 Thread Christopher Wright
Nick Sabalausky wrote: bearophile bearophileh...@lycos.com wrote in message news:gsai34$1p9...@digitalmars.com... Nick Sabalausky: There are people who swear by the ability of adding methods at runtime and changing the inheritance hierarchy dynamically. It makes for a very fluid environment.

Re: Fully dynamic d by opDotExp overloading

2009-04-17 Thread Christopher Wright
Andrei Alexandrescu wrote: Christopher Wright wrote: Andrei Alexandrescu wrote: Cool! I suggest the rewrite: c.unknownmethod(args) - c.opDotExp!(unknownmethod)(args) That way you have the option of handling the method name statically or dynamically. How would that allow you to handle

Re: Why does readln include the line terminator?

2009-04-15 Thread Christopher Wright
Steven Schveighoffer wrote: auto reader = file.byLine!(/[.,]/)(); Why specify anything at compile time when a user could reasonably generate the value at runtime? auto reader = file.byLine(readConfig().separator);

Re: Why Java Doesn't Need Operator Overloading (and Very Few Languages Do, Really)

2009-04-15 Thread Christopher Wright
Don wrote: Paul D. Anderson wrote: Sounds like someone needs a strong dose of D!! http://java.dzone.com/articles/why-java-doesnt-need-operator The comments bounce between operator overloading is always bad because you can do idiotic things with it and operator overloading is essential

Re: Why does readln include the line terminator?

2009-04-14 Thread Christopher Wright
Georg Wrede wrote: Readln returns a string which contains the line terminator. Is there a grand reason for this? Currently there are a few drawbacks with this. The naive user doesn't expect it, and the seasoned user has to keep stripping it. And then he has to search the docs (or get hold

Re: The great inapplicable attribute debate

2009-04-14 Thread Christopher Wright
Frits van Bommel wrote: Stewart Gordon wrote: Don wrote: Stewart Gordon wrote: snip Surely, align isn't applicable to unions at all. IINM the members of a union, by design, start at the same offset. Not so, the alignment of each member should be respected. But the offset of a union

Re: Alignment of unions

2009-04-14 Thread Christopher Wright
Stewart Gordon wrote: Don wrote: Stewart Gordon wrote: snip That's only because you want to be able to attach alignments to individual members of a union. And I still don't know why. I'm not sure why you think unions are so different to structs. They are identical in most respects --

Re: Std Phobos 2 and logging library?

2009-04-12 Thread Christopher Wright
Leandro Lucarella wrote: dsimcha, el 11 de abril a las 05:21 me escribiste: == Quote from Leandro Lucarella (llu...@gmail.com)'s article Andrei Alexandrescu, el 10 de abril a las 16:49 me escribiste: And Braddr just made a documentation fix, and Walter only commits portability stuff and an

<    1   2   3   4   5   >