Weed пишет:
> Bill Baxter пишет:
>> On Tue, Jan 6, 2009 at 1:41 PM, Christopher Wright
>> wrote:
>>> Weed wrote:
Who agrees with me? There are still ideas as it is possible to solve
this problem and not to destroy language?
>>> When you reply to your reply to your reply to your post and
Nick Sabalausky wrote:
"Don" wrote in message
news:gjt7cb$1j...@digitalmars.com...
Nick Sabalausky wrote:
"Don" wrote in message
news:gjsnf2$26g...@digitalmars.com...
bearophile wrote:
Don:
The question was about incrementing uint, not int. Preventing
wraparound on uints would break everyt
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
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
This may be a topic already discussed a lot in the past, if so please bear with
me, it may take me years to catch most of the things already discussed.
I think the way to pass a built-in array may have few main usages:
1) read/write the array, but the length and ptr can't change (default in D1)
Hi,
sorry to ask my question here but since people are motivated by new
language, source code, ... I thought it was a good place to ask my
question about source code analysis.
I would like to know if there are some parsers/scripts that could parse
some C/C++ language and that could insert prin
Vincent Richomme wrote:
Hi,
sorry to ask my question here but since people are motivated by new
language, source code, ... I thought it was a good place to ask my
question about source code analysis.
I would like to know if there are some parsers/scripts that could parse
some C/C++ language a
Do the associative arrays work using the real key or a hash of it and if
it's a hash then what does it do to prevent hash collisions.
== Quote from Tim M (a...@b.com)'s article
> Do the associative arrays work using the real key or a hash of it and if
> it's a hash then what does it do to prevent hash collisions.
The builtin AAs in DMD are implemented as hash tables, although IIRC this is not
guaranteed by the spec and other imp
Bill Baxter wrote:
It seems to me that the built-in .sort uses a randomized algorithm
that leads to results that differ from run-to-run when there are
elements with identical keys.
No, it doesn't use random sorts. The source code is included, so this
should be easy to verify.
On Fri, Jan 2, 2009 at 9:21 AM, Don wrote:
> Duane Bailey wrote:
>
>> I am currently porting LDC to PowerPC and, hopefully, eventually the
>> POWER and CELL platforms as well. The first bit requires me to port the
>> inline assembler, allowing me to
>>
> review the problems that the D language p
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
> Bill Baxter wrote:
> > It seems to me that the built-in .sort uses a randomized algorithm
> > that leads to results that differ from run-to-run when there are
> > elements with identical keys.
> No, it doesn't use random sorts. Th
Ary Borenszweig wrote:
I think Bill speaks about a stable sort. You can have an unstable sort
algorithm without having explicity a random invocation. Note that he's
saying "leads to results that differ from run-to-run when there are
elements with identical keys".
And I believe that the sort i
Sean Kelly wrote:
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
Bill Baxter wrote:
It seems to me that the built-in .sort uses a randomized algorithm
that leads to results that differ from run-to-run when there are
elements with identical keys.
No, it doesn't use random so
(Here I generalise my sentence with supplement)
The POD data and the data supporting polymorphism are necessary to us.
POD the data is stored in structs and polymorphic objects is classes.
Both types (class and struct) can be instanced in a heap or on a stack.
(And in invariant ROM too, but ther
On Wed, Jan 7, 2009 at 4:09 AM, Walter Bright
wrote:
> Ary Borenszweig wrote:
>>
>> I think Bill speaks about a stable sort. You can have an unstable sort
>> algorithm without having explicity a random invocation. Note that he's
>> saying "leads to results that differ from run-to-run when there ar
Stewart Gordon wrote:
These unsafe conversions could still be allowed by explicit casts,
should they be needed for something, IWC you'd be expected to know what
you're doing.
Just thinking about it, I wonder if this would be a good time to
reconsider Janice's 1⅓-year-old proposal for preven
On Wed, 07 Jan 2009 03:49:38 +0300, Stewart Gordon wrote:
Stewart Gordon wrote:
These unsafe conversions could still be allowed by explicit casts,
should they be needed for something, IWC you'd be expected to know what
you're doing.
Just thinking about it, I wonder if this would be a go
Denis Koroskin wrote:
Nice, but I don't like the proposed syntax much, especially these:
cast(!const BaseClass[])
cast(!const const(int)[][])
I believe it would be better to split them into two separate casts as
follows:
BaseClass[] base = cast(BaseClass[])cast(!const)derived;
Won't work.
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
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
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.
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
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
Vincent Richomme Wrote:
> I would like to know if there are some parsers/scripts that could parse
> some C/C++ language and that could insert printf in each function.
One option would be to use a regular expression within a search
and replace.
Just as a simple test I came up regexp that does s
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:
I keep thinking I should put on a "Compiler Construction" seminar!
Sign me up!
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.
28 matches
Mail list logo