Re: Tuple unpacking syntax [Was: Re: Multiple return values...]

2012-03-13 Thread Derek Parnell
the compromise we came up with. -- Derek Parnell

Re: Multiple return values...

2012-03-14 Thread Derek Parnell
On Thu, 15 Mar 2012 08:52:26 +1100, Andrei Alexandrescu wrote: On 3/14/12 3:00 PM, Simen Kjærås wrote: template to(T...) { alias T to; } auto from(T...)(T t) { struct Result { T t; alias t this; } return Result( t ); } void main( ) { int a = 3; int b = 4; to!(a, b) = from(b, a); assert(

Re: Dynamic language

2012-03-15 Thread Derek Parnell
On Thu, 15 Mar 2012 18:09:37 +1100, so wrote: Hello, Not related to D but this is a community which i can find at least a few objective person. I want to invest some "quality" time on a dynamic language but i am not sure which one. Would you please suggest one? To give you an idea what i

Re: DConf 2013 Call for Submissions: deadline on January 28

2013-01-16 Thread Derek Parnell
for the flight. -- Derek Parnell

Re: Operator overloading, structs

2009-06-04 Thread Derek Parnell
when 'a' is an integer of any size or sign. This should *not* be a compiler error as it is a convenient shorthand for some coders. Personally, I try not to code this idiom because I find it misleading in terms of self documentation ... but then I'm against using goto as well ;-) -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: DMD 2.030 doesn't exist

2009-06-04 Thread Derek Parnell
ty. Spelling variations that are "cute" or "modern", are fine in other contexts but not really in a technical forum where there are readers from many different cultures and spoken languages. Using the standard form of English is also a sign of politeness and inclusiveness. In general, we are attempting to communicate our thoughts here so we need to do that in a way that makes it easy for all potential readers in the forum. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: DMD 2.030 doesn't exist

2009-06-04 Thread Derek Parnell
that you trying to help others understand ... now I understand you a bit more. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: DMD 2.030 doesn't exist

2009-06-04 Thread Derek Parnell
On Thu, 04 Jun 2009 19:42:52 -0400, superdan wrote: > my philosophy lesson's worth wut u paid fer it. Yes it is. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Why are void[] contents marked as having pointers?

2009-06-05 Thread Derek Parnell
of small integral value or golf > scores relative to par. Or sound wave sample points [-127, 127] -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: D Wiki

2009-06-10 Thread Derek Parnell
how one can remember all the equivalent HTML tags. I really would not like depending solely on a GUI application to write source code that has embedded documentation. There is a valid place for both models of creating a HTML page. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: why implicitly allowing compare ubyte and byte sucks

2009-06-11 Thread Derek Parnell
n type for byte and ubyte is short. Byte and ubyte have overlapping ranges of values (-127 to 127) and (0 to 255) so a common type would have to be able to hold both these ranges at least, and short (16-bit signed integer) does that. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: D2 vs D1

2009-06-18 Thread Derek Parnell
in you: dmd main.d foo.d me: bud main you: dmd main.d foo.d and.d lots.d of.d other.d stuff.d me: bud main you: 90% of the time that I need more than that, I'm getting into non D build steps so nothing short of a fully general system able to run arbitrary command will cut it

Re: Ranges

2009-06-18 Thread Derek Parnell
it that these are not method names I would have choosen, as I would have preferred names more like ... isEmpty(), getFront(), moveForwards(), getBack(), moveBackwards(), getElement(N), addElement(E), but the bikeshed gods have more wisdom than me ... and not that I'm complaining of course. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Ranges

2009-06-18 Thread Derek Parnell
On Thu, 18 Jun 2009 21:00:08 -0400, bearophile wrote: > Thank you Derek Parnell for your nice summary about ranges: > with to your post my understanding of this topic has gone > from 10% to 15% :-) LOL ... glad to have helped a tiny bit. > There are things I don't understand f

Re: Ranges

2009-06-18 Thread Derek Parnell
On Thu, 18 Jun 2009 19:07:06 -0700, Robert Fraser wrote: > I think an OutputRange doesn't have to be an InputRange. It just needs > put(). You're right. I misread the documentation on that one. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: D2 vs D1

2009-06-25 Thread Derek Parnell
On Thu, 25 Jun 2009 14:10:10 +0200, Don wrote: > Derek Parnell wrote: >>>> On Thu, Jun 18, 2009 at 11:56 AM, BCS wrote: >>>> >>>>> Hello steel, >>>>> >>>>> build tools: ??? haven't followed that much. I use a command

Re: Dejavu

2009-06-25 Thread Derek Parnell
On Thu, 25 Jun 2009 20:44:04 +0100, Robert Clipsham wrote: > Bud hasn’t > been updated in a long time, which is annoying, since there are some > really irritating bugs. Like what? Have these been reported? -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Dejavu

2009-06-25 Thread Derek Parnell
On Thu, 25 Jun 2009 18:28:53 -0400, Jarrett Billingsley wrote: > All of the bugs I've run into in bud have already been reported by > others. I think I know what I'm doing this weekend ;-) -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Dejavu

2009-06-25 Thread Derek Parnell
one. I'll try to reproduce it but not sure if I can yet. I don't really want to download gtk or tango if I can help it. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Dejavu

2009-06-26 Thread Derek Parnell
urce control. > It's in phobos/docsrc. What does "in phobos/docsrc" mean? Is that a partial URL or something that is in the download package. In either case, I don't seem to be able to find it. Can you be a lot more specific? -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Give me a break

2009-06-29 Thread Derek Parnell
write. this is not > china and you are not the great firewall. > grow up. > > if you want a moderated NG than ask Walter to create one. This is *not* > such a NG and people *will* discuss whatever they want, whether you like > it or not. I agree with both of you. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Give me a break

2009-06-29 Thread Derek Parnell
.". LOL ... yeah, right. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: optlink on multicore machines

2009-06-30 Thread Derek Parnell
multithreading > problems - hope D will help here in the future Ok then ... so optlink is going to be rewritten in D - excellent! And good luck to the brave developer too. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Dejavu

2009-06-30 Thread Derek Parnell
ing, and work on it! I've picked the docs. I'm attempting to remove all hardcoded HTML tags from the .dd files. To what address do I send the updated files? -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Dejavu

2009-06-30 Thread Derek Parnell
eive any acknowledgement that they have been received so I don't actually know if Mr B is getting them. What I'd like is Walter to tell me/us where to send such things. I've scanned the website for information but can't find anything there. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Dejavu

2009-06-30 Thread Derek Parnell
he .dd files. To what address do I send the updated files? >> > > I'd e-mail patches to Walter or attach them to an issue in the issue tracker. > Either way make sure Walter knows about them. By the way, I'm using Windows so I don't know how to do a 'patch'

Re: Dejavu

2009-06-30 Thread Derek Parnell
idea of how I can do this? >> > > Use SVN. I'm assuming you got the .dd files that way. I think the command > line tools will do it and I know tortoiseSVN can. It even tags the result > with the version it's off of. Thanks, that worked perfectly. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Give me a break

2009-07-02 Thread Derek Parnell
; for the bad half, do you comment in the bug reports about why you think the >> patches are bad? > > Sometimes, but not usually. I doubted anyone cared as long as they got > fixed one way or another. Bzzzt ... wrong answer. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Have language researchers gotten it all wrong?

2009-07-05 Thread Derek Parnell
because you can get a 99% correct program shipped without having to spend 200% of the money available. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Linker problem

2009-07-05 Thread Derek Parnell
On Sun, 05 Jul 2009 18:55:57 -0700, David B. Held wrote: > I just upgraded > to 2.029 and now I have this problem: I have this too, and I'm using 2.030. It works fine with v1.045. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Case Range Statement ..

2009-07-07 Thread Derek Parnell
On Tue, 07 Jul 2009 04:35:56 -0400, Mike James wrote: > > Or you introduce a new keyword :-) Ooooh you said the 'k' word, naughty boy. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Case Range Statement ..

2009-07-07 Thread Derek Parnell
reak; case 2,5,7,10 .. 17, 24, 32: funcB(); break; case 3,6,8,18 .. 23: funcC(); break; } In other words, allowing a range of value inside a list of values. How is this possible in today's D? -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Case Range Statement ..

2009-07-07 Thread Derek Parnell
On Tue, 07 Jul 2009 10:50:08 -0700, Walter Bright wrote: > I like: > > a .. b+1 > > to mean inclusive range. LOL, now that *is* funny. And I like the Euphoria language's version ... case X to Y but so what, eh? -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Case Range Statement ..

2009-07-07 Thread Derek Parnell
n inclusive range was being requested by the coder. Walter's example, using a function call, could be useful as the function can have side-effects that influence the next sub-expression "x + 3". -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Case Range Statement ..

2009-07-07 Thread Derek Parnell
On Wed, 8 Jul 2009 07:48:07 +1000, Derek Parnell wrote: > On Tue, 07 Jul 2009 10:50:08 -0700, Walter Bright wrote: > >> I like: >> >> a .. b+1 >> >> to mean inclusive range. > > LOL, now that *is* funny. > > And I like the Euphoria languag

Re: Case Range Statement ..

2009-07-07 Thread Derek Parnell
e me very clever or very stupid ... h? By the way, I don't like triple-dot either, but just making a point. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Case Range Statement ..

2009-07-07 Thread Derek Parnell
inclusive. Currently, ('a' .. 'z'+1) Logically, ('a' .. 'z') -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Number literals (Was: Re: Case Range Statement ..)

2009-07-07 Thread Derek Parnell
this idea? I would not complain if trailing dot and leading dot were disallowed. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Case Range Statement ..

2009-07-07 Thread Derek Parnell
On Tue, 07 Jul 2009 19:42:00 -0500, Andrei Alexandrescu wrote: > Derek Parnell wrote: >> On Tue, 07 Jul 2009 19:29:21 -0500, Andrei Alexandrescu wrote: >> >>> There is no need for a right-closed range in the language. It can be >>> defined with ease as a library

Re: Number literals (Was: Re: Case Range Statement ..)

2009-07-07 Thread Derek Parnell
I think that I'm not ready for the D programming language after all. I'll drop by the sandbox from time to time out of curiosity, I suppose. Good luck and thanks for all the fish. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Null references redux

2009-09-28 Thread Derek Parnell
ations. Safe coding practices should not be penalized. The C/C++ programming language is inherently "unsafe" in this regard, and that is not news to anyone. The D programming language does not have to follow this paradigm. I'm still not ready to use D for anything, but I watch it in hope. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-03 Thread Derek Parnell
ing" and then has to switch tracks "oh no, this actually means we are using a template this time". I'm *so* over the amount of symbol and keyword overloading that goes on in D and C-like languages. It's as if they were devised by academics during the days when data transmission times were slow and only they looked at source code. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Personal thoughts about D2 release, D, the Universe and everything

2009-11-07 Thread Derek Parnell
d are having no significant commits are those that might be worthy of relegation. Your suggestions implies that only active incomplete projects (or ones that are constantly being beautified) are worthwhile. Projects that are complete, or at least stable in terms of bug fixing, would drop off t

Re: ch-ch-changes

2009-01-28 Thread Derek Parnell
as the last item in a range. It seems really, really odd; rather contrived actually. I think intutive words for the first and last items in a range would be 'first' and 'last'. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Please vote once and for good: range operations

2009-01-29 Thread Derek Parnell
ately precedes the current (B) element. My preferences are ... (A) first (B) last (C) firstpart (D) lastpart (E) midpart (F) current (G) dropfirst (H) droplast -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: People speaketh

2009-01-29 Thread Derek Parnell
my vote as I can't see my name anywhere. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: People speaketh

2009-01-29 Thread Derek Parnell
more choises if needed, or Andrei could create his own poll or > whatever. Curious that first/last didn't get a mention in your poll? -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Heap: container or range?

2009-01-30 Thread Derek Parnell
On Fri, 30 Jan 2009 14:46:28 -0800, Andrei Alexandrescu wrote: > Names are important. "take" is taken from Haskell. No it hasn't. Haskell still has it so its been "copied" from Haskell. :-) -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: ch-ch-update: series, closed-form series, and strides

2009-01-31 Thread Derek Parnell
e for > short functions that don't need access to local state, their efficiency > is exemplary, and their error messages are not half bad. And syntax-highlighting editors just love them ;-) Knowing which strings contain code and which don't is a piece of cake, no? -- Derek Parn

Re: ch-ch-update: series, closed-form series, and strides

2009-01-31 Thread Derek Parnell
On Sat, 31 Jan 2009 16:26:08 -0800, Andrei Alexandrescu wrote: > The language can help here. q{stuff} is a "token string" I was not aware of the q{} syntax. That should work for smart editors. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: ch-ch-update: series, closed-form series, and strides

2009-02-03 Thread Derek Parnell
ng elements, whereas in a sequence an element can be predicted using only the existing element values. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: goto

2009-02-05 Thread Derek Parnell
-- Move along to the next element pair. a.next; b.next; -- And repeat. } while (true); return sqrt(result); } -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Old problem with performance

2009-02-08 Thread Derek Parnell
rams have is conflating value types with reference types. In D, what is the recommend technique to derive one user-defined value type from another? -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Old problem with performance

2009-02-08 Thread Derek Parnell
On Sun, 08 Feb 2009 14:37:18 -0800, Walter Bright wrote: > Derek Parnell wrote: >> On Sun, 08 Feb 2009 11:13:00 -0800, Walter Bright wrote: >> >>> In particular, classes are *meant* to be used as reference types, but >>> the program is trying to treat them

Re: Why version() ?

2009-02-10 Thread Derek Parnell
On Tue, 10 Feb 2009 13:08:03 +0100, Don wrote: > A&&B is not so terrible, since you can do it by nesting, as above. > The big problem is A || B. It creates a mess. version(A) version = AorB; version(B) version = AorB; version(AorB) { . . . } -- Derek Parnell Melbourne, A

Re: Why version() ?

2009-02-10 Thread Derek Parnell
a satisfactory solution. Duplicating (nearly all of a) source file is NOT, repeat NOT, a satisfatory solution. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Why version() ?

2009-02-10 Thread Derek Parnell
On Tue, 10 Feb 2009 14:01:29 -0800, Walter Bright wrote: > Derek Parnell wrote: >> ... it creates a new problem; code >> duplication. > > I don't think that duplicating a small run of code is a problem. My apology. The problem is more than run-time performance

Re: Why version() ?

2009-02-10 Thread Derek Parnell
t quite all, the logic is identical between both operating systems. This is the sort of scenario that will cause bugs to be introduced. The fine line that divides when to duplicate and when not to duplicate, is hard to see clearly. I tend to favour the less duplication approach, but only when it leads to lower maintenance costs. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: default random object?

2009-02-13 Thread Derek Parnell
or [a, b)? I prefer [a,b] as the default, and I'm thinking integers too. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: default random object?

2009-02-14 Thread Derek Parnell
On Sat, 14 Feb 2009 19:07:52 +0200, Yigal Chripun wrote: > I see. > Having 3 functions: malloc(), expand() and free() is indeed a very good > design. Unless you need to contract the allocated memory ;-) I believe that realloc() does expansions and contractions, no? -- Derek Parnell

Re: OT -- Re: random cover of a range

2009-02-14 Thread Derek Parnell
On Sun, 15 Feb 2009 03:01:24 + (UTC), John Reimer wrote: > So you approve of the material on the website then? Hell no! I suspect that the Elvis image has definitely been digitally re-touched. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: OT -- Re: random cover of a range

2009-02-16 Thread Derek Parnell
the role perfectly with the malice that expresses them (not to say person > should swear when he is angry :) ). It's no wonder that the expression of > them becomes confusing when they merge back into everyday speech for no > apparent > reason. Yep, I think your right here. A

Re: OT -- Re: random cover of a range

2009-02-17 Thread Derek Parnell
though, he actually has some good things to say, its just a pity they take too much effort to translate into English. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: earthquake changes of std.regexp to come

2009-02-17 Thread Derek Parnell
wanted to ask whether y'all could stomach yet > another rewritten API or you'd rather use std.regexp as it is for the > time being. If your changes are going to make things better for coding and maintenance then go for it. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Is str ~ regex the root of all evil, or the leaf of all good?

2009-02-19 Thread Derek Parnell
On Thu, 19 Feb 2009 07:01:56 -0800, Andrei Alexandrescu wrote: > These all put the regex before the string, something many people would > find unsavory. I don't. To me the regex is what you are looking for so it's like saying "find this pattern in that string". -- Derek Parnell

Re: Is str ~ regex the root of all evil, or the leaf of all good?

2009-02-19 Thread Derek Parnell
ike X" means that I'm undecided about whether or not I like X but I probably do not like it. "I don't think I like X" means that I *know* that I don't like X, there is no uncertainty. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Is str ~ regex the root of all evil, or the leaf of all good?

2009-02-19 Thread Derek Parnell
On Thu, 19 Feb 2009 07:46:47 -0800, Andrei Alexandrescu wrote: > Derek Parnell wrote: >> On Thu, 19 Feb 2009 07:01:56 -0800, Andrei Alexandrescu wrote: >> >>> These all put the regex before the string, something many people would >>> find unsavory. >>

Re: Is str ~ regex the root of all evil, or the leaf of all good?

2009-02-19 Thread Derek Parnell
xpression is attempting to say something about one's level of certainty about liking something. That is to say, one might not be positive if they *know* if they like something or not, therefore they *think* (suspect, but not have definitive evidence) of their stance. > Anyway: g is from Perl. Let's keep it that way. Perfect justification ;-) -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Is str ~ regex the root of all evil, or the leaf of all good?

2009-02-19 Thread Derek Parnell
On Thu, 19 Feb 2009 17:59:13 -0500, Jarrett Billingsley wrote: > On Thu, Feb 19, 2009 at 4:06 PM, Derek Parnell wrote: >> On Thu, 19 Feb 2009 10:45:44 -0500, Jarrett Billingsley wrote: >> >>> Also, "I think I don't like X" is not proper English. Say "

Re: Promote D in wikipedia

2009-02-26 Thread Derek Parnell
in other languages already exist, they will be promptly removed. Also, C is still the lingua-franca of the programming community, so examples in *any* other language are usually subject to 'special' editoral scrutiny. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: __FUNCTION__

2009-02-28 Thread Derek Parnell
writefln(__FUNCTION__); } class One { void foo() { writefln(__FUNCTION__); } } struct Two { void foo() { writefln(__FUNCTION__); } } -- Any problems so far? -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: __FUNCTION__

2009-02-28 Thread Derek Parnell
On Sat, 28 Feb 2009 17:27:27 -0500, Jarrett Billingsley wrote: > On Sat, Feb 28, 2009 at 5:24 PM, Derek Parnell wrote: >> void foo() >> { >>    writefln(__FUNCTION__); >> } >> >> void foo(int x) >> { >>    writefln(__FUNCTION__); >> }

Re: __FUNCTION__

2009-02-28 Thread Derek Parnell
g into an ASCII version of APL. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: std.locale

2009-03-02 Thread Derek Parnell
stems already do. I see locale support in D as being a platform-independant method of invoking existing operating system functionality. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: std.locale

2009-03-02 Thread Derek Parnell
lementer to develop messages whose word order is correct for their target language. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: std.locale

2009-03-02 Thread Derek Parnell
On Mon, 02 Mar 2009 18:36:09 -0800, Andrei Alexandrescu wrote: > Phobos has supported Posix positional syntax since 2.006. > > http://digitalmars.com/d/2.0/phobos/std_stdio.html Thank you. I was behind the times (again). -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: std.locale

2009-03-03 Thread Derek Parnell
On Tue, 03 Mar 2009 11:00:36 -0800, Walter Bright wrote: > Contracts are not for input validation! Hear! Hear! This is exactly correct. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: std.locale

2009-03-04 Thread Derek Parnell
validation. Output validation is an attempt to prove that the function's logic is correct. Input validation is not a debugging tool. It is a chance to inform the program's user that they might have given the program some wrong information to work with. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: const?? When and why? This is ugly!

2009-03-06 Thread Derek Parnell
in-place. I'm not advocating or rejecting this ... just trying to recall the original poster's suggestion. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Null references (oh no, not again!)

2009-03-06 Thread Derek Parnell
biggest plot > cliches: People being put into danger by their own creations (2001, Matrix, > Terminator, Battlestar Gallactica...and probably a whole ton of others I > can't think of right now.) Predated by "Prometheus" from Greek mythology and by Mary Shelly's "F

Re: const?? When and why? This is ugly!

2009-03-06 Thread Derek Parnell
onst(char)[]" type because that means that the coder and compiler says that this function won't change the input but we don't particularly care if the input is immutable, or mutable by something else. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Null references (oh no, not again!)

2009-03-06 Thread Derek Parnell
the compiler's place to tell me that my code is unmaintainable. The compiler is your friend, and friends sometimes have to be brutally honest. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: const?? When and why? This is ugly!

2009-03-07 Thread Derek Parnell
l mnemonics for these is a good idea. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: const?? When and why? This is ugly!

2009-03-07 Thread Derek Parnell
table. It is a pity that D's term "string" is being used in discussions as if it is synonymous with character array - but it is not. It only refers to certain types of character arrays - the invariant ones. We really need some simple terms for const and mutable character arrays. --

Re: const?? When and why? This is ugly!

2009-03-07 Thread Derek Parnell
ons and not so much as aliases in our code. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: const?? When and why? This is ugly!

2009-03-07 Thread Derek Parnell
modify any of them. If the caller passes invariant data then your function cannot modify the arguments. If the caller passes mutable data, the compiler won't allow your function to modify the parameters either, due to the const signature. So why is it important that the function should know the mutability of the passed data? -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: const?? When and why? This is ugly!

2009-03-07 Thread Derek Parnell
// defensive copy in case foo keeps a reference to s In foo's defence, if it takes a private reference, then it should also take a copy. In fact, should it be allowed to take a private reference of data which might be modified after it returns? -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: const?? When and why? This is ugly!

2009-03-08 Thread Derek Parnell
]; writef ("a=%s b=%s\n", a [0], b[0]); a [0] += b [0]; writef ("a=%s b=%s\n", a [0], b[0]); } The problem is that we have declared 'b' as invariant, but the program is allowed to change it. That is the issue. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: const?? When and why? This is ugly!

2009-03-08 Thread Derek Parnell
On Sun, 08 Mar 2009 00:36:06 -0800, Walter Bright wrote: > Derek Parnell wrote: >> import std.stdio; >> void main() >> { >> int [] a = new int [1]; >> >>a [0] = 1; >> >>invariant (int) [] b = cast (invariant (int) []) a; >> &g

Re: const?? When and why? This is ugly!

2009-03-08 Thread Derek Parnell
On Sun, 08 Mar 2009 01:19:15 -0800, Walter Bright wrote: > Derek Parnell wrote: >> Walter, you have side-stepped the problem in question by talking about a >> totally different problem. > > It's the same issue. When you use a cast, you are subverting the type > syst

Re: Immutable + goto?

2009-03-19 Thread Derek Parnell
to be immutable. You should only declare immutable those things that you know actually are already immutable - like literals or stuff which is only ever assigned to once. On the other hand, I think this should be a bug. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: What can you "new"

2009-03-22 Thread Derek Parnell
ply ... void str() { char[] s; } But you knew (no pun intended) that already. What you were actually asking for is more like ... struct dynary { size_t len; void *data; } void str() { auto s = cast(char[]*)(new dynary); } void main() { str(); } -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Is DSSS still being developed?

2009-03-22 Thread Derek Parnell
in some months. Got it in one. I'm waiting for D2 before enhancing Bud any more. ... then there's my unreleased text processor (macros) that also waits for D2. ... and the version of the Euphoria language in D. D1 is a non-starter for me now. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Is DSSS still being developed?

2009-03-22 Thread Derek Parnell
life kicks in. I'm 54 years old, BTW -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: What can you "new"

2009-03-22 Thread Derek Parnell
On Mon, 23 Mar 2009 03:30:22 +0300, Denis Koroskin wrote: > I wouldn't recommend using that to anyone. That's a *dirty* hack! That goes without saying ;-) TO BE AVOIDED AT ALL COSTS. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: build a project

2009-03-26 Thread Derek Parnell
On Thu, 26 Mar 2009 21:21:47 +0100, Don wrote: > I use bud. Even though it hasn't been touched since rebuild began. :-(. How would like Bud to be 'touched'. I'm happy to make it better but I'm not sure what you need from it. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: D's "accessors" are like abusing operator overloads

2009-03-27 Thread Derek Parnell
to same value a = 42; b = 42; c = 42; or even ... // Set all to c's value c = 42; b = c; a = c; -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: [OT] [I mean totally OT] Re: What can you "new"

2009-03-28 Thread Derek Parnell
al vessels from our near future find themselves back in the Pacific war of 1942. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Contract programming syntax

2009-04-08 Thread Derek Parnell
Yes! I've never been happen with the awkwardness of the current syntax. It looks just plain wrong and certainly not intuitive or helpful when reading code. And as you suggest 'in' and 'out' are already special words (and Walter has a special love for overloading keywords)

Re: The new, new phobos sneak preview

2009-04-08 Thread Derek Parnell
On Wed, 08 Apr 2009 19:24:10 -0400, superdan wrote: > ill get hands dirty n maybe report more. If you do, can you report back using English. I'm not very good at translating your, presumably excellent, insights otherwise. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

  1   2   >