Re: std.string will get the boot

2010-01-31 Thread Michel Fortin
On 2010-01-30 22:06:06 -0500, Lionello Lunesu said: On 30-1-2010 1:59, Andrei Alexandrescu wrote: bearophile wrote: Andrei Alexandrescu: Currently arrays of characters count as random-access ranges, which is not true for arrays of char and wchar. I plan to make std.range aware of that and on

Re: Google's Go & Exceptions

2010-01-31 Thread John D
"Walter Bright" wrote in message news:hk1v87$1pe...@digitalmars.com... > John D wrote: >> "Walter Bright" wrote in message >>> This goes back to my theory that a feature that encourages the >>> programmer to insert misleading dead code to shut the compiler up is >>> a misfeature. >> A program

Re: Google's Go & Exceptions

2010-01-31 Thread John D
"dsimcha" wrote in message news:hk24v0$23d...@digitalmars.com... > == Quote from John D (jd...@googling.com)'s article >> A programmer who does the above is not a good programmer. That said, a >> compiler that doesn't warn that variables or arguments have gone >> unused >> in a function is not

Re: Google's Go & Exceptions

2010-01-31 Thread John D
"Walter Bright" wrote in message news:hk1uso$1om...@digitalmars.com... > John D wrote: >> Commonly called "2 step construction". But you forgot to add the check >> on the return val from c.create(). > > No need to - c.create() should throw if it fails. > What's the point of doing 2-step constr

Re: Google's Go

2010-01-31 Thread John D
"Walter Bright" wrote in message news:hk1uqu$1om...@digitalmars.com... > John D wrote: >> "Walter Bright" wrote in message >> news:hjg3b0$el...@digitalmars.com... >>> Nick Sabalausky wrote: You know, even though I'm one of the resident Google-haters here, I have to admit, I saw a th

Re: Google's Go

2010-01-31 Thread John D
"Andrei Alexandrescu" wrote in message news:hk1ksq$153...@digitalmars.com... > John D wrote: >> "bearophile" wrote in message >> news:hjh61f$2c6...@digitalmars.com... >>> Recently I've seen this, is it possible to write an equally short & >>> safe & easy program in D2 (using the concurrency f

TDPL a bad idea?

2010-01-31 Thread John D
Did anyone watch Shark Tank on TV this week? Captain Ice Cream was rejected by all of the sharks and sent packing because he wanted to sell a franchise that wasn't. One of the sharks said to him something along the lines of, "a franchise offering is a package deal for a product that is a well-o

Re: Google's Go & Exceptions

2010-01-31 Thread Nick Sabalausky
"John D" wrote in message news:hk0mph$2dt...@digitalmars.com... > > "Andrei Alexandrescu" wrote in message > news:hjo75f$2g3...@digitalmars.com... >> Nick Sabalausky wrote: >>> >>> Still within the context of this D BigInt example, what benefit does >>> using a factory method provide over a th

Re: Google's Go & Exceptions

2010-01-31 Thread Nick Sabalausky
"John D" wrote in message news:hk33sm$186...@digitalmars.com... > > "Walter Bright" wrote in message > news:hk1uso$1om...@digitalmars.com... >> John D wrote: >>> Commonly called "2 step construction". But you forgot to add the check >>> on the return val from c.create(). >> >> No need to - c.c

Re: Google's Go & Exceptions

2010-01-31 Thread Walter Bright
John D wrote: So you are indeed saying that the D compiler gives no such warnings, That's right.

Re: Google's Go & Exceptions

2010-01-31 Thread Walter Bright
John D wrote: "Walter Bright" wrote in message news:hk1uso$1om...@digitalmars.com... John D wrote: Commonly called "2 step construction". But you forgot to add the check on the return val from c.create(). No need to - c.create() should throw if it fails. What's the point of doing 2-step co

Re: Google's Go & Exceptions

2010-01-31 Thread John D
"Walter Bright" wrote in message news:hk3bjj$1k1...@digitalmars.com... > John D wrote: >> So you are indeed saying that the D compiler gives no such warnings, > > That's right. Because it is "D" ?

Re: Google's Go & Exceptions

2010-01-31 Thread John D
"Walter Bright" wrote in message news:hk3bld$1k1...@digitalmars.com... > John D wrote: >> "Walter Bright" wrote in message >> news:hk1uso$1om...@digitalmars.com... >>> John D wrote: Commonly called "2 step construction". But you forgot to add the check on the return val from c.creat

Re: Google's Go & Exceptions

2010-01-31 Thread John D
"Nick Sabalausky" wrote in message news:hk3bij$1k4...@digitalmars.com... > "John D" wrote in message > news:hk0mph$2dt...@digitalmars.com... >> >> "Andrei Alexandrescu" wrote in message >> news:hjo75f$2g3...@digitalmars.com... >>> Nick Sabalausky wrote: Still within the context of

Re: std.string will get the boot

2010-01-31 Thread Simen kjaeraas
Lionello Lunesu wrote: I miss typedef. I think this is exactly what typedef was intended for. Perhaps we can reintroduce it as a 'short hand' for such a struct? struct Typedef( T ) { T payload; alias payload this; } Usage: alias Typedef!( int ) myInt; Is this what you want? By the wa

Re: TDPL a bad idea?

2010-01-31 Thread Bane
> > Why a killing of trees for a manual that changes daily and can be on the > internet? What is the point of TDPL? To make money? I don't see any value > in a set of pages that are a manual for a constantly changing and > unestablished computer programming language. Can't yaz save the trees an

Re: Google's Go & Exceptions

2010-01-31 Thread Nick Sabalausky
"John D" wrote in message news:hk3f9n$1t0...@digitalmars.com... > > "Nick Sabalausky" wrote in message > news:hk3bij$1k4...@digitalmars.com... >> "John D" wrote in message >> news:hk0mph$2dt...@digitalmars.com... >>> >>> "Andrei Alexandrescu" wrote in message >>> news:hjo75f$2g3...@digitalm

Re: Google's Go & Exceptions

2010-01-31 Thread Nick Sabalausky
"John D" wrote in message news:hk3f9m$1t0...@digitalmars.com... > > "Walter Bright" wrote in message > news:hk3bld$1k1...@digitalmars.com... >> John D wrote: >>> "Walter Bright" wrote in message >>> news:hk1uso$1om...@digitalmars.com... John D wrote: > Commonly called "2 step constru

Re: TDPL a bad idea?

2010-01-31 Thread Nick Sabalausky
"John D" wrote in message news:hk381s$1es...@digitalmars.com... > Did anyone watch Shark Tank on TV this week? Captain Ice Cream was > rejected by all of the sharks and sent packing because he wanted to sell a > franchise that wasn't. One of the sharks said to him something along the > lines o

d2 bug ! bug !

2010-01-31 Thread dolive
d2 near to the final text , want to increase the manpower and intensity of bug fixes , fight for to fix 200 bug monthly . hehe : -) thanks to all dolive

Re: TDPL a bad idea?

2010-01-31 Thread John D
"Nick Sabalausky" wrote in message news:hk3kq6$268...@digitalmars.com... > "John D" wrote in message > news:hk381s$1es...@digitalmars.com... >> Did anyone watch Shark Tank on TV this week? Captain Ice Cream was >> rejected by all of the sharks and sent packing because he wanted to >> sell a

D-IDE and its new project site

2010-01-31 Thread A Bothe
Hello D World! As I visited digitalmars.com just a few minutes ago I noticed that there's a link to my website. Of course I'm really happy about that but D-IDE has a new page on SourceForge now - so could somebody update the link to http://d-ide.sourceforge.net, please? Thanks, Alex

Re: TDPL a bad idea?

2010-01-31 Thread Lars T. Kyllingstad
Bane wrote: Why a killing of trees for a manual that changes daily and can be on the internet? What is the point of TDPL? To make money? I don't see any value in a set of pages that are a manual for a constantly changing and unestablished computer programming language. Can't yaz save the trees

Re: std.string will get the boot

2010-01-31 Thread Denis Koroskin
On Sun, 31 Jan 2010 01:30:41 +0300, Simen kjaeraas wrote: Andrei Alexandrescu wrote: bearophile wrote: I can't remember the bit size of wchar and dchar. So names like char, char16 and char32 can be better... I think it's a tad late for that. So adding aliases to object.d is not possi

Re: std.string will get the boot

2010-01-31 Thread Denis Koroskin
On Sun, 31 Jan 2010 11:34:03 +0300, Simen kjaeraas wrote: Lionello Lunesu wrote: I miss typedef. I think this is exactly what typedef was intended for. Perhaps we can reintroduce it as a 'short hand' for such a struct? struct Typedef( T ) { T payload; alias payload this; } Usage:

Re: std.string will get the boot

2010-01-31 Thread Simen kjaeraas
On Sun, 31 Jan 2010 15:09:28 +0100, Denis Koroskin <2kor...@gmail.com> wrote: On Sun, 31 Jan 2010 01:30:41 +0300, Simen kjaeraas wrote: Andrei Alexandrescu wrote: bearophile wrote: I can't remember the bit size of wchar and dchar. So names like char, char16 and char32 can be better..

Re: Google's Go & Exceptions

2010-01-31 Thread Yigal Chripun
On 27/01/2010 02:57, Justin Johansson wrote: Ary Borenszweig wrote: Walter Bright wrote: Justin Johansson wrote: (1) For some reason (possibly valid only in an historic context), I have this great aversion to throwing exceptions from inside C++ constructors. From memory, I once threw an except

Re: more property discussion...

2010-01-31 Thread sclytrack
How is that message passing thing going? C# has an attribute called [NonSerialized] and [XmlIgnore] and Java has transient to mark things that are not to be serialized. Will there be an equivalent thing for D? I was also wondering about a syntax if you wish to automatically serialize properties

Re: TDPL a bad idea?

2010-01-31 Thread Bane
Lars T. Kyllingstad Wrote: > Bane wrote: > >> Why a killing of trees for a manual that changes daily and can be on the > >> internet? What is the point of TDPL? To make money? I don't see any value > >> in a set of pages that are a manual for a constantly changing and > >> unestablished compute

Re: TDPL a bad idea?

2010-01-31 Thread Simen kjaeraas
On Sun, 31 Jan 2010 16:27:39 +0100, Bane wrote: Lars T. Kyllingstad Wrote: Bane wrote: >> Why a killing of trees for a manual that changes daily and can be on the >> internet? What is the point of TDPL? To make money? I don't see any value >> in a set of pages that are a manual for a c

Re: Function calls

2010-01-31 Thread Don
Nick Sabalausky wrote: "Pelle Månsson" wrote in message news:hjv9sf$1n5...@digitalmars.com... On 01/29/2010 07:10 PM, Steven Schveighoffer wrote: Note in the anecdote above, both users would have been satisfied if you could *only* call empty without parentheses. That's a good point. The writ

Re: Function calls

2010-01-31 Thread dsimcha
== Quote from Don (nos...@nospam.com)'s article > Nick Sabalausky wrote: > > "Pelle Månsson" wrote in message > > news:hjv9sf$1n5...@digitalmars.com... > >> On 01/29/2010 07:10 PM, Steven Schveighoffer wrote: > >>> Note in the anecdote above, both users would have > >>> been satisfied if you could

Re: Google's Go

2010-01-31 Thread Ellery Newcomer
On 01/30/2010 11:46 PM, John D wrote: best one out there (IMO, until I implement my own, of course) << http://en.wikipedia.org/wiki/Lake_Wobegone_effect

Unit testing with asserts: Why is assertHandler required to throw?

2010-01-31 Thread Trip Volpe
I recently began porting an existing C++ project of mine (a compiler/interpreter for a dynamic language) to D. In the process I found that the built-in unit testing support, while an awesome concept, was a little bit sparse. In particular, assert() is fairly useless for unit tests, since it thr

Re: Unit testing with asserts: Why is assertHandler required to throw?

2010-01-31 Thread Nick Sabalausky
"Trip Volpe" wrote in message news:hk4pql$1eh...@digitalmars.com... >I recently began porting an existing C++ project of mine (a >compiler/interpreter for a dynamic language) to D. In the process I found >that the built-in unit testing support, while an awesome concept, was a >little bit spars

Re: Unit testing with asserts: Why is assertHandler required to throw?

2010-01-31 Thread Lutger
On 01/31/2010 09:39 PM, Trip Volpe wrote: I recently began porting an existing C++ project of mine (a compiler/interpreter for a dynamic language) to D. In the process I found that the built-in unit testing support, while an awesome concept, was a little bit sparse. In particular, assert() is

Re: Unit testing with asserts: Why is assertHandler required to throw?

2010-01-31 Thread Nick Sabalausky
"Lutger" wrote in message news:hk4r35$1hp...@digitalmars.com... > > You can use line and file info with default arguments, this works (special > case). That must be a D2 thing, because I know it doesn't work in D1.

Re: Unit testing with asserts: Why is assertHandler required to throw?

2010-01-31 Thread Lutger
On 01/31/2010 10:04 PM, Nick Sabalausky wrote: "Lutger" wrote in message news:hk4r35$1hp...@digitalmars.com... You can use line and file info with default arguments, this works (special case). That must be a D2 thing, because I know it doesn't work in D1. Indeed, here is the change: htt

Re: Unit testing with asserts: Why is assertHandler required to throw?

2010-01-31 Thread Pelle Månsson
On 01/31/2010 09:39 PM, Trip Volpe wrote: I recently began porting an existing C++ project of mine (a compiler/interpreter for a dynamic language) to D. In the process I found that the built-in unit testing support, while an awesome concept, was a little bit sparse. In particular, assert() is

Re: Function calls

2010-01-31 Thread bearophile
dsimcha: > Yea, can anyone even come up with a good Devil's Advocate argument in favor of > leaving these in? The best one I can think of is that, since arrays in D are > builtin, the basic functionality for them should also be builtin so they feel > "first-class". This is a pretty weak argument.

Re: Function calls

2010-01-31 Thread torhu
On 29.01.2010 05:20, Steven Schveighoffer wrote: Andrei Alexandrescu Wrote: Michiel Helvensteijn wrote: > Andrei Alexandrescu wrote: > foreach (line; stdin.byLine()) { ... } vs. foreach (line; stdin.byLine) { ... } How do I choose? >>> byLine

Re: TDPL a bad idea?

2010-01-31 Thread BCS
Hello Bane, Lars T. Kyllingstad Wrote: When TDPL is published D2 will be frozen. That's the whole point. -Lars Aha! What about... D3 ? :) TDPL 2e And FWIW, I'm in the lets kill trees camp. p.s. Why doesn't anyone ever bring up the power requirements for reading digital docs? Making a

Re: Unit testing with asserts: Why is assertHandler required to throw?

2010-01-31 Thread Trip Volpe
Lutger Wrote: > > You can use line and file info with default arguments, this works > (special case). I just hack around the default unittest system, > something like this: > > void test(string testName)(void delegate () testClosure, > int line = __LINE__, >

Re: Unit testing with asserts: Why is assertHandler required to throw?

2010-01-31 Thread Trip Volpe
Nick Sabalausky Wrote: > The deferAssert module (possible name change and other API improvements > pending) of my SemiTwist D Tools library ( > http://www.dsource.org/projects/semitwist ) is designed to get around those > problems. Good to know I'm not the only one who's had to working around

Unofficial wish list status.(Feb 2010)

2010-01-31 Thread 4tuu4k002
Hi This is the monthly status for the unofficial d wish list: http://all-technology.com/eigenpolls/dwishlist/ I am closing this wish list. New requests should be posted to bugzilla on http://d.puremagic.com/issues/ It would be a great help, if you could help move some of the wish list items

Re: TDPL a bad idea?

2010-01-31 Thread Ali Çehreli
John D wrote: What is your name and address? I was considering about commenting on your missing identity. If you want me to take you seriously, you must show me that you are brave enough to use your real name. Only then you can start learning how empty your self-proclaimed C++ understanding

Using DMD2 on Ubuntu 9.04 x64?

2010-01-31 Thread Trip Volpe
I installed the DMD2 compiler as per the instructions here: http://www.digitalmars.com/d/2.0/dmd-linux.html After tweaking the conf file to get it actually working, I tried compiling a simple "hello, world" program. This was the result: /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-li

Re: Unit testing with asserts: Why is assertHandler required to throw?

2010-01-31 Thread Nick Sabalausky
"Trip Volpe" wrote in message news:hk583n$28e...@digitalmars.com... > Nick Sabalausky Wrote: >> The deferAssert module (possible name change and other API improvements >> pending) of my SemiTwist D Tools library ( >> http://www.dsource.org/projects/semitwist ) is designed to get around >> those

Re: Using DMD2 on Ubuntu 9.04 x64?

2010-01-31 Thread Nick Sabalausky
"Trip Volpe" wrote in message news:hk5p4f$2t...@digitalmars.com... >I installed the DMD2 compiler as per the instructions here: >http://www.digitalmars.com/d/2.0/dmd-linux.html > > After tweaking the conf file to get it actually working, I tried compiling > a simple "hello, world" program. This

TDPL (Again)

2010-01-31 Thread John D
Scam or what? I ain't buyin' it. Are you? And are you dumb (post your IQ)?

Re: Using DMD2 on Ubuntu 9.04 x64?

2010-01-31 Thread Trip Volpe
Nick Sabalausky Wrote: > I haven't gotten into D2 yet, but D1 (DMD) works fine on Ubuntu 9.04 for me. > Hm, just tried DMD 1.0, same exact result. Do you have a 32-bit installation of Ubuntu?

Re: Unit testing with asserts: Why is assertHandler required to throw?

2010-01-31 Thread Trip Volpe
Pelle MÃ¥nsson Wrote: > > An assertion handler should be created for use in unittests. Preferably > with colorized output. :) > > I stole and changed slightly from std.contracts.enforce (untested) > > T test(T, string file=__FILE__, int line=__LINE__) > (T value, string message="T

Re: Using DMD2 on Ubuntu 9.04 x64?

2010-01-31 Thread Walter Bright
Trip Volpe wrote: Has anybody else managed to get DMD2 up and running on Ubuntu? It _is_ possible, right? Here's what I use on Ubuntu 64: sudo apt-get install gcc-multilib libc6-i386 lib6-dev-i386 sudo apt-get install gcc-multilib sudo apt-get install g++-multilib

Re: Using DMD2 on Ubuntu 9.04 x64?

2010-01-31 Thread Andrei Alexandrescu
Walter Bright wrote: Trip Volpe wrote: Has anybody else managed to get DMD2 up and running on Ubuntu? It _is_ possible, right? Here's what I use on Ubuntu 64: sudo apt-get install gcc-multilib libc6-i386 lib6-dev-i386 sudo apt-get install gcc-multilib sudo apt-get install g++-multilib Th

Re: Unit testing with asserts: Why is assertHandler required to throw?

2010-01-31 Thread bearophile
Trip Volpe: > Ah ha! I din't know that D had __LINE__ and __FILE__. I thought those had > been done away with along with the preprocessor. It looks like they're a lot > smarter than in C as well, since this works just fine: > > test.d: > 1 void main() { > 2 printlocation();// prints "