Georg Wrede wrote:
Walter Bright wrote:
I see I was being too obscure.
See "Colossus, the Forbin Project" http://us.imdb.com/title/tt0064177/
Heh, by an incredible coincidence, it aired here a couple of weeks ago.
Maybe that's why I felt the reference too obvious to comment on.
I think it i
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" http:/
Georg Wrede wrote:
Jarrett Billingsley wrote:
I mean, who's such a nutcase that he forgets halfway in the dragging,
what
it is he's dragging?
Middle-click.
Yeah.
But I still don't see the glamouros advantages in dragging whole pictures.
And I often drag stuff to existing tabs. A good exam
"renoX" wrote in message news:49f56a74.4000...@free.fr...
> Nick Sabalausky a écrit :
>> "bearophile" wrote in message
>> news:gsipn1$1bn...@digitalmars.com...
>>> Andrei Alexandrescu:
If it were an error, I wouldn't let it go.
>>> It's an error. It will lead to troubles.
>>>
>>
>> Sometime
Stewart Gordon wrote:
Walter Bright wrote:
Stewart Gordon wrote:
Walter, how often do you update your working copy from the SVN?
Obviously less than once every 2 releases.
As far as I know, it is current. Everything got checked in.
So how has the fix for
http://d.puremagic.com/issues/show_b
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" http:
Georg Wrede wrote:
Yeah. But now I'm getting a bad conscience, this is beginning to look
like Walter-bashing... :-)
Don't worry, I'm immune to that. Back in 1984 or so during a code review
at work, a colleague grepped for goto and presented a listing of all the
gotos with the comment about wh
Don wrote:
Actually, looking through the DMD source it becomes obvious that goto is
really not a problem at all. The lack of comments is much more of a
problem. (Especially with files with names like "e2ir.c".
e2ir => Expression To Intermediate Representation
What the heck
is "fltables.c",
Stewart Gordon wrote:
So how has the fix for
http://d.puremagic.com/issues/show_bug.cgi?id=2580
(and probably others) not been included?
I'll look into it.
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" http://us.imdb.com/title/tt
Nick Sabalausky a écrit :
"bearophile" wrote in message
news:gsipn1$1bn...@digitalmars.com...
Andrei Alexandrescu:
If it were an error, I wouldn't let it go.
It's an error. It will lead to troubles.
Sometimes it is an error, but there are times when it isn't:
[cut]
Call List In Psuedo-Ja
Nick Sabalausky a écrit :
"bearophile" wrote in message
news:gsipn1$1bn...@digitalmars.com...
Andrei Alexandrescu:
If it were an error, I wouldn't let it go.
It's an error. It will lead to troubles.
Sometimes it is an error, but there are times when it isn't:
[cut]
Call List In Psuedo-Ja
Tomas Lindquist Olsen Wrote:
> On Mon, Apr 20, 2009 at 2:47 PM, Saaa wrote:
> > Using D1 feels especially retarded today :(
> >
>
> Why retarded ?
I think because of new features
*cough* featurism *cough*
Tomas Lindquist Olsen Wrote:
> On Mon, Apr 20, 2009 at 2:47 PM, Saaa wrote:
> > Using D1 feels especially retarded today :(
> >
>
> Why retarded ?
I think because of new features
*cough* featurism *cough*
Don wrote:
bearophile wrote:
Isn't sin(x)+sin(x) pure? Even if the compiler doesn't want to replace
x+x with x*2 because x is a floating point, it can do:
y = sin(x)
y+y
And that gives the same result even with FPs.
Yes. From further investigation, I've found that:
(1) the optimisation of
Hello Nick,
I guess if you really hate having it not kill the app then the
program could just not /have/ a x button.
You've got to be kidding me, that would be just as bad. Why would I
want to have a program get rid of the standard "exit" mechanism?
If you basicly never want to exit it? (see
"BCS" wrote in message
news:78ccfa2d3ebc18cb92e7b8abe...@news.digitalmars.com...
>
> Are you saying you never make mistakes? There are program out there that
> 90% of the time when I hit the x button it was a mistake and in that cases
> I think it to be a good design to work around it.
?? Not
Reply to Christopher,
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.
So I guess we're stuck with the no-close close button if we don't want any
way to close the app in
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.
Andrei Alexandrescu wrote:
grauzone wrote:
Simen Kjaeraas wrote:
Do note that I might have misinterpreted it all, as Andrei's code
would not do what I have outlined above, I only feel it makes the
most sense.
Yeah OK, but what about virtual functions? Not having it virtual is a
real disadva
On Fri, 24 Apr 2009 14:00:19 -0400, Nick Sabalausky wrote:
"BCS" wrote in message
news:a6268ff50d58cb92d952e5b...@news.digitalmars.com...
Hello Nick,
"BCS" wrote in message
news:a6268ff50558cb926917215...@news.digitalmars.com...
yah, for some programs you rarely want to close the program
Reply to Nick,
"BCS" wrote in message
news:a6268ff50d58cb92d952e5b...@news.digitalmars.com...
Hello Nick,
"BCS" wrote in message
news:a6268ff50558cb926917215...@news.digitalmars.com...
yah, for some programs you rarely want to close the program but
often want to close the UI.
That's cal
"BCS" wrote in message
news:a6268ff50d58cb92d952e5b...@news.digitalmars.com...
> Hello Nick,
>
>> "BCS" wrote in message
>> news:a6268ff50558cb926917215...@news.digitalmars.com...
>>
>>> yah, for some programs you rarely want to close the program but often
>>> want to close the UI.
>>>
>> That's
Hello Nick,
"BCS" wrote in message
news:a6268ff50558cb926917215...@news.digitalmars.com...
yah, for some programs you rarely want to close the program but often
want to close the UI.
That's called "Minimize".
It can be, OTOH I might want the UI process killed without killing the main
pr
Andrei Alexandrescu wrote:
grauzone wrote:
Simen Kjaeraas wrote:
Do note that I might have misinterpreted it all, as Andrei's code
would not do what I have outlined above, I only feel it makes the
most sense.
Yeah OK, but what about virtual functions? Not having it virtual is a
real disadva
grauzone wrote:
Simen Kjaeraas wrote:
Do note that I might have misinterpreted it all, as Andrei's code
would not do what I have outlined above, I only feel it makes the most
sense.
Yeah OK, but what about virtual functions? Not having it virtual is a
real disadvantage, because subclass-part
grauzone wrote:
It took me some serious browsing before I found a non-obtrusive skin
for gmplayer. And I hated to have to do that. It should have been the
default.
AFAIK, the gmplayer GUI is deprecated. Use mplayer or smplayer. smplayer
is a GUI for mplayer that surprisingly manages to use a
Nick Sabalausky wrote:
"Georg Wrede" wrote in message
news:gsrrfn$kv...@digitalmars.com...
Those video editors, iTunes and such look like they're programmed by
12-year olds. Somewhere there should be an adult saying what not to do!
Well put.
I bet the guy who did this never expected that w
Simen Kjaeraas wrote:
grauzone wrote:
void streamOut(T, R)(T object, R range)
{
foreach(x; a) range.put(x);
range.put(b);
range.put(c);
}
So, um... what is a b c and T object?
In my opinion, this is a confusing example. I believe it was meant to be:
void streamOut(T, R)(T objec
grauzone wrote:
void streamOut(T, R)(T object, R range)
{
foreach(x; a) range.put(x);
range.put(b);
range.put(c);
}
So, um... what is a b c and T object?
In my opinion, this is a confusing example. I believe it was meant to be:
void streamOut(T, R)(T object, R range)
{
foreach(
It took me some serious browsing before I found a non-obtrusive skin for
gmplayer. And I hated to have to do that. It should have been the default.
AFAIK, the gmplayer GUI is deprecated. Use mplayer or smplayer. smplayer
is a GUI for mplayer that surprisingly manages to use a standard GUI,
an
On Fri, 24 Apr 2009 13:54:26 +0400, Nick Sabalausky wrote:
"BCS" wrote in message
news:a6268ff50558cb926917215...@news.digitalmars.com...
Hello Christopher,
Nick Sabalausky wrote:
The absolute worst of all though is when an app (*cough* skype
*cough*) decides that "close" and "the 'close'
"Georg Wrede" wrote in message
news:gsrqbj$iu...@digitalmars.com...
> Steven Schveighoffer wrote:
>> On Thu, 23 Apr 2009 14:32:13 -0400, Georg Wrede
>> wrote:
>>> I mean, who's such a nutcase that he forgets halfway in the dragging,
>>> what it is he's dragging?
>>
>> It might be useful if you
"Georg Wrede" wrote in message
news:gsrrfn$kv...@digitalmars.com...
>
> Those video editors, iTunes and such look like they're programmed by
> 12-year olds. Somewhere there should be an adult saying what not to do!
>
Well put.
> I bet the guy who did this never expected that whole-picture drag
"BCS" wrote in message
news:a6268ff50558cb926917215...@news.digitalmars.com...
> Hello Christopher,
>
>> Nick Sabalausky wrote:
>>
>>> The absolute worst of all though is when an app (*cough* skype
>>> *cough*) decides that "close" and "the 'close' button" should mean
>>> "don't close anything at
Nick Sabalausky wrote:
"Steven Schveighoffer" wrote in message
news:op.usux6bskeav...@steves.networkengines.com...
I was never a huge fan of application themes. I don't mind a theme for
the whole system (as long as it's simple), but I don't want iTunes to look
different just because it can.
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 14:32:13 -0400, Georg Wrede wrote:
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 12:09:20 -0400, Georg Wrede
So now I have to learn to remember to grab bigger pictures near some
edge. And I really can't see *any* valid benefit for having to d
Jarrett Billingsley wrote:
On Thu, Apr 23, 2009 at 2:32 PM, Georg Wrede wrote:
(OT: an excellent example of this It's Done Because We Noticed We Could
stuff is in Firefox. When a picture is a link to another page, and you want
to drag that to the tab area, the entire picture is dragged with th
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 14:32:13 -0400, Georg Wrede wrote:
I mean, who's such a nutcase that he forgets halfway in the dragging,
what it is he's dragging?
It might be useful if you accidentally start dragging the wrong thing,
and then realize because you are dragging
BCS wrote:
> Hello Christopher,
>
>> Nick Sabalausky wrote:
>>
>>> The absolute worst of all though is when an app (*cough* skype
>>> *cough*) decides that "close" and "the 'close' button" should mean
>>> "don't close anything at all, but minimize to tray instead". That
>>> should be a firing
Hello Christopher,
Nick Sabalausky wrote:
The absolute worst of all though is when an app (*cough* skype
*cough*) decides that "close" and "the 'close' button" should mean
"don't close anything at all, but minimize to tray instead". That
should be a firing squad offense ;)
I'd be killing my
On Thu, 23 Apr 2009 21:40:36 -0400, Christopher Wright wrote:
> Nick Sabalausky wrote:
>> "Steven Schveighoffer" wrote in message
>> news:op.usux6bskeav...@steves.networkengines.com...
>>> I was never a huge fan of application themes. I don't mind a theme
>>> for the whole system (as long as it'
Nick Sabalausky wrote:
"Steven Schveighoffer" wrote in message
news:op.usux6bskeav...@steves.networkengines.com...
I was never a huge fan of application themes. I don't mind a theme for
the whole system (as long as it's simple), but I don't want iTunes to look
different just because it can.
"Steven Schveighoffer" wrote in message
news:op.usux6bskeav...@steves.networkengines.com...
>
> I was never a huge fan of application themes. I don't mind a theme for
> the whole system (as long as it's simple), but I don't want iTunes to look
> different just because it can.
>
That's one of
On Thu, Apr 23, 2009 at 6:01 PM, Christopher Wright wrote:
> 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);
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 ran
On Thu, 23 Apr 2009 14:32:13 -0400, Georg Wrede wrote:
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 12:09:20 -0400, Georg Wrede
wrote:
(OT: an excellent example of this It's Done Because We Noticed We
Could stuff is in Firefox. When a picture is a link to another page,
and you want
On Thu, Apr 23, 2009 at 2:32 PM, Georg Wrede wrote:
>>> (OT: an excellent example of this It's Done Because We Noticed We Could
>>> stuff is in Firefox. When a picture is a link to another page, and you want
>>> to drag that to the tab area, the entire picture is dragged with the mouse.
>>> Now,
On Thu, 23 Apr 2009 14:32:13 -0400, Georg Wrede wrote:
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 12:09:20 -0400, Georg Wrede
wrote:
(OT: an excellent example of this It's Done Because We Noticed We
Could stuff is in Firefox. When a picture is a link to another page,
and you want
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 12:09:20 -0400, Georg Wrede wrote:
(OT: an excellent example of this It's Done Because We Noticed We
Could stuff is in Firefox. When a picture is a link to another page,
and you want to drag that to the tab area, the entire picture is
dragged w
Steven Schveighoffer wrote:
As most ranges are structs (and rightfully
so, who wants to call 3 virtual functions every loop!), they would have
to be wrapped under the current compiler. Or am I missing something else?
Yes, some wrapping would have to be done. Hopefully it will simple
enough
On Thu, 23 Apr 2009 12:09:20 -0400, Georg Wrede wrote:
(OT: an excellent example of this It's Done Because We Noticed We Could
stuff is in Firefox. When a picture is a link to another page, and you
want to drag that to the tab area, the entire picture is dragged with
the mouse. Now, how th
On Thu, 23 Apr 2009 18:28:53 +0400, Andrei Alexandrescu
wrote:
> Denis Koroskin wrote:
>> Sink is okay, but most my usages belong to one of the two scenarios: 1)
>> I need a string representation of an Object - how is Sink useful
>> here? I just want to call obj.toString() and get the result 2
On Thu, 23 Apr 2009 19:34:38 +0400, Don wrote:
> Georg Wrede wrote:
>> Don wrote:
>>> Georg Wrede wrote:
Don wrote:
> Georg Wrede wrote:
>> Don wrote:
>>> bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to
Georg Wrede wrote:
> Don wrote:
>> Georg Wrede wrote:
>>> One thing we sholuld be wary of is overdesign. BigInt is ok, but by
>>> the time we try to include a class called
>>> CompleteSimulationOfAnF1RaceCar, we're screwed. :-) I see no way to
>>> incorporate them into writefln or even plain write
bearophile wrote:
Don:
toString() is one of the most dreadful features in D.
It's also one of the most useful, and it's quite easy to understand
and use. You need very little brain to use it. Features that require
little/no brain are very important to me (but surely it's a quality
that is at t
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
Don 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.
It'd be really funny to pass i
Don wrote:
Georg Wrede wrote:
One thing we sholuld be wary of is overdesign. BigInt is ok, but by
the time we try to include a class called
CompleteSimulationOfAnF1RaceCar, we're screwed. :-) I see no way to
incorporate them into writefln or even plain writeln. Or at least, no
*use*.
I thi
On Thu, 23 Apr 2009 10:30:15 -0400, Andrei Alexandrescu
wrote:
Daniel Keep wrote:
Andrei Alexandrescu wrote:
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 09:24:59 -0400, Andrei Alexandrescu
wrote:
Steven Schveighoffer wrote:
This has to go into object.d and be part of the runtime,
Don:
> toString() is one of the most dreadful features in D.
It's also one of the most useful, and it's quite easy to understand and use.
You need very little brain to use it. Features that require little/no brain are
very important to me (but surely it's a quality that is at the bottom of the
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
Don wrote:
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest
it and its new Phobos2. While I explore Phobos I'll probably post
some comments/bugs
Simen Kjaeraas:
> That actually sounds like a good idea. Like you say, is has no use
> outside of debugging, but while debugging, it's quite useful.
It's also important for small script-like programs.
I am using D to write a lot of them :-)
Bye,
bearophile
Don wrote:
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
Don wrote:
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest
it and its new Phobos2. While I explore Phobos I'll probably post
some comments/bugs around here.
Afte
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
Don wrote:
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest it
and its new Phobos2. While I explore Phobos I'll probably post some
comments/bugs around here.
After reading th
Andrei Alexandrescu wrote:
grauzone wrote:
Andrei Alexandrescu wrote:
grauzone 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);
Daniel Keep wrote:
Andrei Alexandrescu wrote:
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 09:24:59 -0400, Andrei Alexandrescu
wrote:
Steven Schveighoffer wrote:
This has to go into object.d and be part of the runtime, where
std.range doesn't exist. There is nothing stopping you from c
Denis Koroskin wrote:
Sink is okay, but most my usages belong to one of the two scenarios:
1) I need a string representation of an Object - how is Sink useful
here? I just want to call obj.toString() and get the result 2) I need
to print it to stdout, thus I call writeln/Stdout(obj); - Sink is o
Andrei Alexandrescu wrote:
> Steven Schveighoffer wrote:
>> On Thu, 23 Apr 2009 09:24:59 -0400, Andrei Alexandrescu
>> wrote:
>>
>>> Steven Schveighoffer wrote:
This has to go into object.d and be part of the runtime, where
std.range doesn't exist. There is nothing stopping you from c
Don wrote:
Georg Wrede wrote:
Don wrote:
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest it
and its new Phobos2. While I explore Phobos I'll probably post some
comments/bugs around here.
After reading this:
http://blogs.msd
grauzone wrote:
Andrei Alexandrescu wrote:
grauzone 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);
}
Eh. Is a sink callback t
On Thu, Apr 23, 2009 at 2:37 PM, Don wrote:
> bearophile wrote:
>>
>> Don:
>>>
>>> I really don't understand the backend. It's quite cryptic. Key acronyms
>>> are AE, CP and VBE. Then there's Bin, Bgen, Bkill, etc.
>>> AE *might* be Available Expression (but what does that mean?)
>>> CP might be C
Andrei Alexandrescu wrote:
Georg Wrede wrote:
Wow!
What if writeln would automatically call to!string for any object or
struct?
That's the plan, I didn't get around to it. I want to do it the right
way, i.e. with general streams, not strings.
I'm just impressed.
Georg Wrede wrote:
Don wrote:
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest it
and its new Phobos2. While I explore Phobos I'll probably post some
comments/bugs around here.
After reading this:
http://blogs.msdn.com/vcblog
Sink is okay, but most my usages belong to one of the two scenarios:
1) I need a string representation of an Object - how is Sink useful here? I
just want to call obj.toString() and get the result
2) I need to print it to stdout, thus I call writeln/Stdout(obj); - Sink is of
no use here again.
Andrei Alexandrescu wrote:
grauzone 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);
}
Eh. Is a sink callback too simple and eas
On Thu, 23 Apr 2009 17:35:59 +0400, Frits van Bommel
wrote:
> Denis Koroskin wrote:
>> On Thu, 23 Apr 2009 16:20:03 +0400, Don wrote:
>>
>>> struct Foo(A, B, C){
>>> A[10] a;
>>> B b;
>>> C c;
>>> void toString(Sink sink){
>>> foreach(x; a) sink(x);
>>> sink(b);
>>> sink(c);
>>> }
>
Georg Wrede wrote:
Wow!
What if writeln would automatically call to!string for any object or
struct?
That's the plan, I didn't get around to it. I want to do it the right
way, i.e. with general streams, not strings.
Andrei
Frits van Bommel wrote:
Andrei Alexandrescu wrote:
Steven Schveighoffer wrote:
So I'd rather have a sink function.
It must be a sink _object_ so it can hold its own state. And it must
support put() so it integrates with statically-bound output ranges.
interface OutRange
{
void put(...
Andrei Alexandrescu wrote:
Georg Wrede wrote:
Second, since we have cool stuff in D, like templates, boxing, and
other advanced things, then compared to them, it should not be a big
deal to have automatic creation of toString for structs and objects.
(This could even be on-demand, i.e. unless
Andrei Alexandrescu wrote:
Frits van Bommel wrote:
IMHO It'd be pretty nice for the standard formatting systems (both the
Tango and Phobos ones) to just call a standard Object method taking
(Sink sink, char[] format = null) on objects.
Probably we'll need that. You forgot the "in" though :o).
Georg Wrede wrote:
Second, since we have cool stuff in D, like templates, boxing, and other
advanced things, then compared to them, it should not be a big deal to
have automatic creation of toString for structs and objects. (This could
even be on-demand, i.e. unless called, the toString is not
Frits van Bommel wrote:
I usually define something like "void streamTo(Sink sink)" in a base
class if I want non-allocating output. Adding a format string to the
parameter list should be easy, but I haven't needed it yet.
I then usually implement toString by passing an appending Sink to that
me
Andrei Alexandrescu wrote:
Steven Schveighoffer wrote:
So I'd rather have a sink function.
It must be a sink _object_ so it can hold its own state. And it must
support put() so it integrates with statically-bound output ranges.
interface OutRange
{
void put(... a number of overloads ...
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 09:24:59 -0400, Andrei Alexandrescu
wrote:
Steven Schveighoffer wrote:
This has to go into object.d and be part of the runtime, where
std.range doesn't exist. There is nothing stopping you from calling:
streamOut(&outputrange.put);
So I'd r
Don wrote:
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest it
and its new Phobos2. While I explore Phobos I'll probably post some
comments/bugs around here.
After reading this:
http://blogs.msdn.com/vcblog/archive/2009/04/22/
Denis Koroskin wrote:
On Thu, 23 Apr 2009 16:20:03 +0400, Don wrote:
struct Foo(A, B, C){
A[10] a;
B b;
C c;
void toString(Sink sink){
foreach(x; a) sink(x);
sink(b);
sink(c);
}
}
... but it's not, you have to create a silly buffer to put all your
strings in, even if there are 20
On Thu, 23 Apr 2009 09:24:59 -0400, Andrei Alexandrescu
wrote:
Steven Schveighoffer wrote:
This has to go into object.d and be part of the runtime, where
std.range doesn't exist. There is nothing stopping you from calling:
streamOut(&outputrange.put);
So I'd rather have a sink function.
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 09:06:38 -0400, Andrei Alexandrescu
wrote:
It ought to be at least as simple as:
struct Foo(A, B, C){
A[10] a;
B b;
C c;
void toString(Sink sink){
foreach(x; a) sink(x);
sink(b);
sink(c);
}
}
... but it's not, you have to create a sill
grauzone 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);
}
Eh. Is a sink callback too simple and easy to use or what?
?
Andre
On Thu, 23 Apr 2009 09:06:38 -0400, Andrei Alexandrescu
wrote:
It ought to be at least as simple as:
struct Foo(A, B, C){
A[10] a;
B b;
C c;
void toString(Sink sink){
foreach(x; a) sink(x);
sink(b);
sink(c);
}
}
... but it's not, you have to create a silly buffer to put all your
s
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);
}
Eh. Is a sink callback too simple and easy to use or what?
Don wrote:
No!
toString() is one of the most dreadful features in D. Trying to slightly
improve it is a waste of time -- the whole concept needs to be redone.
It's horribly inflexible, tedious, and hugely inefficient. What more
could there be to hate?
I agree.
- the object being called has
On Thu, 23 Apr 2009 16:20:03 +0400, Don wrote:
> bearophile wrote:
>> This post is mostly for Andrei.
>> I have played with D2 a bit; probably I'll need months to digest it and
>> its new Phobos2. While I explore Phobos I'll probably post some
>> comments/bugs around here.
>> After reading t
On Thu, 23 Apr 2009 18:09:06 +0900, Andrei Alexandrescu
wrote:
Masahiro Nakagawa wrote:
I submitted this problem to bugzilla.
http://d.puremagic.com/issues/show_bug.cgi?id=2882
Thanks! I fixed it and checked in std.random.
Wow!
std.random in svn works fine.
Thanks for your quick respon
Don wrote:
I'd like to see version(debug) {} put around Object.toString(). It's a
deathtrap feature that's got no business being used other than for
debugging.
That actually sounds like a good idea. Like you say, is has no use
outside of debugging, but while debugging, it's quite useful.
-
No!
toString() is one of the most dreadful features in D. Trying to slightly
improve it is a waste of time -- the whole concept needs to be redone.
It's horribly inflexible, tedious, and hugely inefficient. What more
could there be to hate?
Hey, it's only meant for debugging! (At least I hope
bearophile wrote:
Don:
I really don't understand the backend. It's quite cryptic. Key acronyms
are AE, CP and VBE. Then there's Bin, Bgen, Bkill, etc.
AE *might* be Available Expression (but what does that mean?)
CP might be Copy Propagation info
I've found that VBE = "Very Busy Expression"! (w
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest it and its new
Phobos2. While I explore Phobos I'll probably post some comments/bugs around
here.
After reading this:
http://blogs.msdn.com/vcblog/archive/2009/04/22/decltype-c-0x
Don:
> I really don't understand the backend. It's quite cryptic. Key acronyms
> are AE, CP and VBE. Then there's Bin, Bgen, Bkill, etc.
> AE *might* be Available Expression (but what does that mean?)
> CP might be Copy Propagation info
> I've found that VBE = "Very Busy Expression"! (what does th
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest it and its new
Phobos2. While I explore Phobos I'll probably post some comments/bugs around
here.
After reading this:
http://blogs.msdn.com/vcblog/archive/2009/04/22/decltype-c-0x-features-in-vc10-pa
1 - 100 of 217 matches
Mail list logo