"Walter Bright" wrote in message
news:gk6150$n6...@digitalmars.com...
> Nick Sabalausky wrote:
>> "Rioshin an'Harthen" wrote in message
>> news:gk4kfh$ri...@digitalmars.com...
>>> "Walter Bright" kirjoitti viestissä
>>> news:gk1dag$pt...@digitalmars.com...
I keep thinking I should put on
Nick Sabalausky wrote:
"Rioshin an'Harthen" wrote in message
news:gk4kfh$ri...@digitalmars.com...
"Walter Bright" kirjoitti viestissä
news:gk1dag$pt...@digitalmars.com...
I keep thinking I should put on a "Compiler Construction" seminar!
A net-seminar, please, so that those of us who want to
BCS wrote:
Reply to Walter,
Robert Fraser wrote:
Walter Bright wrote:
I keep thinking I should put on a "Compiler Construction" seminar!
*cough* NWCPP *cough*
I'd like to do a paid one .
BTW, Bartosz has graciously offered the Jan NWCPP speaking engagement
to me. I'll be talking about
Reply to Walter,
Robert Fraser wrote:
Walter Bright wrote:
I keep thinking I should put on a "Compiler Construction" seminar!
*cough* NWCPP *cough*
I'd like to do a paid one .
BTW, Bartosz has graciously offered the Jan NWCPP speaking engagement
to me. I'll be talking about mixins and t
"Rioshin an'Harthen" wrote in message
news:gk4kfh$ri...@digitalmars.com...
> "Walter Bright" kirjoitti viestissä
> news:gk1dag$pt...@digitalmars.com...
>> I keep thinking I should put on a "Compiler Construction" seminar!
>
> A net-seminar, please, so that those of us who want to attend actuall
"Walter Bright" kirjoitti viestissä
news:gk1dag$pt...@digitalmars.com...
I keep thinking I should put on a "Compiler Construction" seminar!
A net-seminar, please, so that those of us who want to attend actually can.
Robert Fraser wrote:
Walter Bright wrote:
I keep thinking I should put on a "Compiler Construction" seminar!
*cough* NWCPP *cough*
I'd like to do a paid one .
BTW, Bartosz has graciously offered the Jan NWCPP speaking engagement to
me. I'll be talking about mixins and templates. All are we
Walter Bright wrote:
I keep thinking I should put on a "Compiler Construction" seminar!
*cough* NWCPP *cough*
Walter Bright wrote:
Andrei Alexandrescu wrote:
Walter Bright wrote:
Academic papers on compiler optimizations always start out with
"assume there are no pointers, no references, no arrays, no
exceptions, no threads, no aliasing, no overflows, no
signed/unsigned, there are infinite registers
Andrei Alexandrescu wrote:
Walter Bright wrote:
Academic papers on compiler optimizations always start out with
"assume there are no pointers, no references, no arrays, no
exceptions, no threads, no aliasing, no overflows, no signed/unsigned,
there are infinite registers available, registers a
On Thu, Jan 8, 2009 at 10:28 AM, Andrei Alexandrescu
wrote:
> Walter Bright wrote:
>>
>> Bill Baxter wrote:
>>>
>>> On Thu, Jan 8, 2009 at 6:46 AM, Andrei Alexandrescu
>>> wrote:
Bill Baxter wrote:
>
> On Thu, Jan 8, 2009 at 5:54 AM, Walter Bright
> wrote:
>>
>> Sea
Walter Bright wrote:
Bill Baxter wrote:
On Thu, Jan 8, 2009 at 6:46 AM, Andrei Alexandrescu
wrote:
Bill Baxter wrote:
On Thu, Jan 8, 2009 at 5:54 AM, Walter Bright
wrote:
Sean Kelly wrote:
I keep thinking I should put on a "Compiler Construction" seminar!
You should. The academic courses
Reply to Walter,
Bill Baxter wrote:
On Thu, Jan 8, 2009 at 5:54 AM, Walter Bright
It's like in physics class you're always dealing with frictionless
brakes and pointless masses.
You mean massless points? Or was that deliberate?
I wondered if anyone would notice that (!). Yes, it's delib
Bill Baxter wrote:
On Thu, Jan 8, 2009 at 6:46 AM, Andrei Alexandrescu
wrote:
Bill Baxter wrote:
On Thu, Jan 8, 2009 at 5:54 AM, Walter Bright
wrote:
Sean Kelly wrote:
I keep thinking I should put on a "Compiler Construction" seminar!
You should. The academic courses do a good job with th
Bill Baxter wrote:
On Thu, Jan 8, 2009 at 5:54 AM, Walter Bright
It's like in physics class you're always dealing with frictionless brakes
and pointless masses.
You mean massless points? Or was that deliberate?
I wondered if anyone would notice that (!). Yes, it's deliberate.
On Thu, Jan 8, 2009 at 6:46 AM, Andrei Alexandrescu
wrote:
> Bill Baxter wrote:
>>
>> On Thu, Jan 8, 2009 at 5:54 AM, Walter Bright
>> wrote:
>>>
>>> Sean Kelly wrote:
>
> I keep thinking I should put on a "Compiler Construction" seminar!
You should. The academic courses do a g
Bill Baxter wrote:
On Thu, Jan 8, 2009 at 5:54 AM, Walter Bright
wrote:
Sean Kelly wrote:
I keep thinking I should put on a "Compiler Construction" seminar!
You should. The academic courses do a good job with theory and
general application, but that isn't quite the same as one based on
pract
On Thu, Jan 8, 2009 at 5:54 AM, Walter Bright
wrote:
> Sean Kelly wrote:
>>>
>>> I keep thinking I should put on a "Compiler Construction" seminar!
>>
>> You should. The academic courses do a good job with theory and
>> general application, but that isn't quite the same as one based on
>> practic
Tomas Lindquist Olsen wrote:
On Wed, Jan 7, 2009 at 6:07 AM, Walter Bright
The last time I even heard of a compiler that fell over and gave up
optimizing if it saw a goto was in the early 80's. I have a hard
time believing LDC has problems with it, but if it does, the authors
sho
Sean Kelly wrote:
I keep thinking I should put on a "Compiler Construction" seminar!
You should. The academic courses do a good job with theory and
general application, but that isn't quite the same as one based on
practical experience.
That's true. I learned the theory taking a compiler con
On Wed, Jan 7, 2009 at 6:07 AM, Walter Bright wrote:
> Don wrote:
>
>> I still avoid goto because I was told to. But eventually I realised that
>> it's 100% propaganda. I actually think my code would be cleaner if I used
>> it; it would allow lots of local flag variables to be eliminated.
>> But I
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
> Don wrote:
> > I still avoid goto because I was told to. But eventually I realised that
> > it's 100% propaganda. I actually think my code would be cleaner if I
> > used it; it would allow lots of local flag variables to be elimin
Robert Fraser wrote:
Daniel Keep Wrote:
It's rather ironic, but one thing that struck me going from Visual Basic
to Python was that VB had much nicer error handling; instead of having
error handling all over the place, it was all localised to the end of
the function. This is why I absolutel
Reply to Walter,
I keep thinking I should put on a "Compiler Construction" seminar!
That would be fun. If I could, I'd show up.
Walter Bright wrote:
I keep thinking I should put on a "Compiler Construction" seminar!
Sign me up!
Andrei Alexandrescu wrote:
The challenge the paper addresses is constructing the SSA form in one
shot. There are indeed algorithms that build the SSA in several passes.
My vague recollection from a compiler construction class is that there
are a number of static analyses that need to do a fixe
Walter Bright wrote:
grauzone wrote:
bearophile wrote:
Don:
Actually Walter loves goto, so DMD copes really well with it.
When possible it's better to use structured programming and avoid
gotos. That construct can avoid gotos in some common situations.
And regarding the compiler back-end, I
Don wrote:
I still avoid goto because I was told to. But eventually I realised that
it's 100% propaganda. I actually think my code would be cleaner if I
used it; it would allow lots of local flag variables to be eliminated.
But I still have this residual prejudice against 'goto' which is really
Don wrote:
It's possible to create grotesque configurations of 'goto' which are
extremely difficult to analyze.
For a human, yes. For well-known optimization algorithms, no.
grauzone wrote:
bearophile wrote:
Don:
Actually Walter loves goto, so DMD copes really well with it.
When possible it's better to use structured programming and avoid
gotos. That construct can avoid gotos in some common situations.
And regarding the compiler back-end, I think it's also bette
Daniel Keep Wrote:
> It's rather ironic, but one thing that struck me going from Visual Basic
> to Python was that VB had much nicer error handling; instead of having
> error handling all over the place, it was all localised to the end of
> the function. This is why I absolutely adore scope sta
Brian wrote:
[snip]
neither of those seem necessary in that example, whats wrong with this:
void somefunction() {
do_stuff();
if (error)
handle_error();
else
do_more_stuff();
}
A few things I can think of:
1. You're mixing error handli
On Mon, 05 Jan 2009 11:13:49 +0100, grauzone wrote:
> void somefunction() {
> do_stuff();
> if (error)
> goto error_exit:
> do_more_stuff();
>
> return;
>
> error_exit:
> handle_error();
> }
>
> This could be replaced by something like this:
>
> void
Nick Sabalausky wrote:
bool isFound=false;
foreach(char[] key, Foo f; fooAA)
{
if(f.someFlag && key in barAA && f.someVal > barAA[key].someVal)
{
isFound = true;
break;
}
}
if(!isFound)
Stdout.formatln("Missing!");
foreach (a, b; aa)
if (weLike(a, b)) goto fou
foreach(languageStatement; AllProgrammingLanguages)
Stdout.format(
"It's possible to create grotesque configurations of '{}' which are "~
"extremely difficult to analyze. But most uses of {} are simple.",
languageStatement
).newline;
grauzone wrote:
bearophile wrote:
Don:
Actually Walter loves goto, so DMD copes really well with it.
When possible it's better to use structured programming and avoid
gotos. That construct can avoid gotos in some common situations.
And regarding the compiler back-end, I think it's also bette
bearophile wrote:
Don:
Actually Walter loves goto, so DMD copes really well with it.
When possible it's better to use structured programming and avoid gotos.
Structured programming does not mean no gotos. You should really read
the original paper "Goto considered harmful", you'll find it's
bearophile wrote:
Don:
Actually Walter loves goto, so DMD copes really well with it.
When possible it's better to use structured programming and avoid gotos. That
construct can avoid gotos in some common situations.
And regarding the compiler back-end, I think it's also better to start thinki
Don:
> Actually Walter loves goto, so DMD copes really well with it.
When possible it's better to use structured programming and avoid gotos. That
construct can avoid gotos in some common situations.
And regarding the compiler back-end, I think it's also better to start thinking
what's good for
BCS:
> I think your expectation would be a good feature but I can't really see else
> being the right keyword to use. How about "finally"? Or another option with
> scope(*) like "fallthrough"?
The good thing of "else" is that you don't need a new keyword. But it's not
intuitive. A better keywor
bearophile wrote:
Brian:
any chance we could see something like pythons else statement on
iterative loops in D (Might be useful on regular for loops too but not as
much)?
http://docs.python.org/tutorial/controlflow.html#break-and-continue-
statements-and-else-clauses-on-loops
It seems everyo
On Mon, 05 Jan 2009 01:11:34 +0300, BCS wrote:
Reply to Nick,
I had never heard of that before, but it certainly seems like
something I'd find useful. Any time I'm using for or foreach to find
something, I end up having to use some sort of "isFound" flag and
check that after the loop. A for..
Daniel de Kok:
>Wouldn't it be more adequate to rewrite this as a function/method that takes a
>predicate?<
In my dlibs there are things that allow to do that, but the code is slower.
---
BCS:
>Wait, that's not the way I would expect else to work.<
See the answer by Guido V. R. hi
Reply to Nick,
I had never heard of that before, but it certainly seems like
something I'd find useful. Any time I'm using for or foreach to find
something, I end up having to use some sort of "isFound" flag and
check that after the loop. A for...else would be much nicer, for
example:
[...]
On Sun, 04 Jan 2009 14:01:41 -0500, Nick Sabalausky wrote:
> bool isFound=false;
> foreach(char[] key, Foo f; fooAA)
> {
> if(f.someFlag && key in barAA && f.someVal > barAA[key].someVal)
> {
> isFound = true;
> break;
> }
> }
> if(!isFound)
> Stdout.formatln("Missin
"bearophile" wrote in message
news:gjqpt0$1lr...@digitalmars.com...
> Brian:
>> any chance we could see something like pythons else statement on
>> iterative loops in D (Might be useful on regular for loops too but not as
>> much)?
>> http://docs.python.org/tutorial/controlflow.html#break-and-con
Brian:
> any chance we could see something like pythons else statement on
> iterative loops in D (Might be useful on regular for loops too but not as
> much)?
> http://docs.python.org/tutorial/controlflow.html#break-and-continue-
> statements-and-else-clauses-on-loops
It seems everyone has ignor
47 matches
Mail list logo