== Quote from dsimcha (dsim...@yahoo.com)'s article
I've created an alpha release of parallelFuture, a high-level parallelization
library for D2. Right now, it has a task pool, futures, parallel foreach, and
parallel map.
Here's the (IMHO) coolest example:
auto pool = new ThreadPool();
//
dsimcha wrote:
I've created an alpha release of parallelFuture, a high-level parallelization
library for D2. Right now, it has a task pool, futures, parallel foreach, and
parallel map.
Here's the (IMHO) coolest example:
auto pool = new ThreadPool();
// Assuming we have a function isPrime(),
== Quote from Lars T. Kyllingstad (pub...@kyllingen.nospamnet)'s article
Is there some particular reason why you have capitalised the F in the
file name, but not in the module name?
-Lars
This is called the effects of being in hack mode late at night. I guess the
convention is all lower case.
== Quote from Tim Matthews (tim.matthe...@gmail.com)'s article
dsimcha wrote:
I've created an alpha release of parallelFuture, a high-level
parallelization
library for D2. Right now, it has a task pool, futures, parallel foreach,
and
parallel map.
Here's the (IMHO) coolest
== Quote from Charles Hixson (charleshi...@earthlink.net)'s article
dsimcha wrote:
I've created an alpha release of parallelFuture, a high-level
parallelization
library for D2. Right now, it has a task pool, futures, parallel foreach,
and
parallel map.
Here's the (IMHO) coolest
dsimcha wrote:
For now, parallelFuture was designed with a single producer, multiple worker
model. Absolutely no attempt was made to allow for tasks running in the task
pool
to themselves submit jobs to the same task pool, because it would have made
things
more complicated and I couldn't
== Quote from Tim Matthews (tim.matthe...@gmail.com)'s article
dsimcha wrote:
For now, parallelFuture was designed with a single producer, multiple worker
model. Absolutely no attempt was made to allow for tasks running in the
task pool
to themselves submit jobs to the same task pool,
KennyTM~ kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On Oct 22, 09 12:29, AJ wrote:
Adam D. Ruppedestructiona...@gmail.com wrote in message
news:mailman.228.1256181155.20261.digitalmar...@puremagic.com...
On Wed, Oct 21, 2009 at 09:25:34PM -0500, AJ wrote:
AJ wrote:
Steven Schveighoffer schvei...@yahoo.com wrote in message
news:op.u16mw4o6eav...@localhost.localdomain...
On Wed, 21 Oct 2009 23:10:38 -0400, AJ a...@nospam.net wrote:
Steven Schveighoffer schvei...@yahoo.com wrote in message
news:op.u16j03t2eav...@localhost.localdomain...
On Wed,
Nick Sabalausky a...@a.a wrote in message
news:hbontv$uq...@digitalmars.com...
AJ a...@nospam.net wrote in message news:hbof8k$ed...@digitalmars.com...
Adam D. Ruppe destructiona...@gmail.com wrote in message
news:mailman.226.1256173717.20261.digitalmar...@puremagic.com...
On Wed, Oct 21,
Sean Kelly s...@invisibleduck.org wrote in message
news:hbo3bv$2q2...@digitalmars.com...
AJ Wrote:
How can/does D guarantee that int will always be 32 bits on all
platforms?
Does this mean that D won't work on some platforms? Why is integer width
so
ambiguous in C/C++? (I am using platform
AJ wrote:
Nick Sabalausky a...@a.a wrote in message
news:hbonbp$to...@digitalmars.com...
AJ a...@nospam.net wrote in message news:hboaeu$5s...@digitalmars.com...
BCS n...@anon.com wrote in message
news:a6268ffbb0a8cc20817fe1f...@news.digitalmars.com...
Hello aJ,
I would think so. Anyway,
Leandro Lucarella wrote:
Don, el 21 de octubre a las 09:46 me escribiste:
All my public email addresses are fake. Bugzilla is just spam bait.
It clearly comes from a more innocent age. I once made the mistake
of submitting a bug to gcc. Although the GCC Bugzilla hides the
email in the
AJ wrote:
Why not eliminate the requirement for semicolon statement terminators
(unless there are multiple statements per line)? Less typing is more!
Please don't post crazy stuff like this. This proposal would break every
line of D code ever written. YOU ARE WASTING YOUR TIME (and everyone
On 22/10/2009 02:01, Walter Bright wrote:
Yigal Chripun wrote:
the only valid IMO use case for header files is for linking libs - the
compiler can handle just find binary formats for that.
I was originally going to go with a binary format for that - but it
turned out to be pointless. dmd is
Yigal Chripun wrote:
On 22/10/2009 02:01, Walter Bright wrote:
Yigal Chripun wrote:
the only valid IMO use case for header files is for linking libs - the
compiler can handle just find binary formats for that.
I was originally going to go with a binary format for that - but it
turned out to
Steven Schveighoffer wrote:
On Wed, 21 Oct 2009 19:21:32 -0400, Walter Bright
newshou...@digitalmars.com wrote:
Yigal Chripun wrote:
The C/C++ way of headers + lib has problems which D inherited as part
of the same (broken) design.
Hardly, as:
1. you don't need to use header files in D at
Adam D. Ruppe wrote:
Ifthepointisntplainobviousfromtheabovefewersymbolsmostcertainly
doesNOTmeanalanguageisnecessarilyeasiertoparseSymbolsgiveus
aparsinganchorperiodsinasentencearentstrictlynecessarywecould
putoneperlineorjustfigureoutwheretheybelongbyparsingthecontext
Andrei Alexandrescu wrote:
Bill Baxter wrote:
On Wed, Oct 21, 2009 at 6:35 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
3. Remove some element from the container and give it to me
E removeAny();
4. Add an element to the container is possible
bool add(E);
I think any
AJ wrote:
Walter Bright newshou...@digitalmars.com wrote in message
news:hbo7fa$316...@digitalmars.com...
AJ wrote:
You lose the ability to use, say a class declaration, as the
specification (at least without a sophisitcated,
code-folding/code-formatting IDE).
Just change class to interface
bearophile Wrote:
Even worse, someone may even implement such alternative D syntax, and the
sky will fall on your head:
http://delight.sourceforge.net/
import dlt io Printer
class Main
void main Printer stdout
stdout write Hello World!\n
lolol
Semicolons As Implicit Programming Language Statement Terminators (An
Analysis in Process)
Pros:
1. Makes parsing of certain (they need to be listed) constructs easier (how
much?) (?).
2. Adds redundancy which helps diagnose and isolate (facilitates reporting
of ) the following common
Walter Bright newshou...@digitalmars.com wrote in message
news:hbp2lc$1m2...@digitalmars.com...
Adam D. Ruppe wrote:
Ifthepointisntplainobviousfromtheabovefewersymbolsmostcertainly
doesNOTmeanalanguageisnecessarilyeasiertoparseSymbolsgiveus
Don Wrote:
Please don't post crazy stuff like this. This proposal would break every
line of D code ever written.
If semicolons become optional, the old code that uses them will keep working,
because adding an extra semicolon isn't an error.
Broken lines like:
foo(x,
y);
a = [1, 2,
3];
c =
Walter Bright:
Adam D. Ruppe wrote:
Ifthepointisntplainobviousfromtheabovefewersymbolsmostcertainly
doesNOTmeanalanguageisnecessarilyeasiertoparseSymbolsgiveus
aparsinganchorperiodsinasentencearentstrictlynecessarywecould
putoneperlineorjustfigureoutwheretheybelongbyparsingthecontext
Don nos...@nospam.com wrote in message
news:hbp00i$1d8...@digitalmars.com...
AJ wrote:
Why not eliminate the requirement for semicolon statement terminators
(unless there are multiple statements per line)? Less typing is more!
Please don't post crazy stuff like this. This proposal
It's
Nick Sabalausky a...@a.a wrote in message
news:hboum3$1bh...@digitalmars.com...
AJ a...@nospam.net wrote in message
news:hbosh1$17l...@digitalmars.com...
Nick Sabalausky a...@a.a wrote in message
news:hbontv$uq...@digitalmars.com...
If you want to manually write a separate redundant
Walter Bright newshou...@digitalmars.com wrote in message
news:hbp309$1nb...@digitalmars.com...
AJ wrote:
Walter Bright newshou...@digitalmars.com wrote in message
news:hbo7fa$316...@digitalmars.com...
AJ wrote:
You lose the ability to use, say a class declaration, as the
specification
Yigal Chripun yigal...@gmail.com wrote in message
news:hbp0hh$1i2...@digitalmars.com...
the benefits of using the llvm byte-code format are as following:
1) platform neutral
Ha! I consider it another platform!
2) has efficient representation for in-memory and an equivalent for
on-disk.
I say we should get rid of vowels - it worked for the ancient egyptians :-)
Next thing you know someone will propose eliminating braces and just
using whitespace to denote blocks. It's utter madness.
Or get rid of all the visible chars and use Whitespace...
Walter Bright newshou...@digitalmars.com wrote in message
news:hbp2a5$1m2...@digitalmars.com...
Steven Schveighoffer wrote:
On Wed, 21 Oct 2009 19:21:32 -0400, Walter Bright
newshou...@digitalmars.com wrote:
Yigal Chripun wrote:
The C/C++ way of headers + lib has problems which D
Chris Nicholson-Sauls ibisbase...@gmail.com wrote in message
news:hbou95$1al...@digitalmars.com...
AJ wrote:
Nick Sabalausky a...@a.a wrote in message
news:hbonbp$to...@digitalmars.com...
AJ a...@nospam.net wrote in message
news:hboaeu$5s...@digitalmars.com...
BCS n...@anon.com wrote in
Nick Sabalausky a...@a.a wrote in message
news:hboui3$1bb...@digitalmars.com...
AJ a...@nospam.net wrote in message
news:hbor97$155...@digitalmars.com...
Nick Sabalausky a...@a.a wrote in message
news:hbonj3$u3...@digitalmars.com...
AJ a...@nospam.net wrote in message
On Oct 22, 09 17:31, AJ wrote:
Nick Sabalauskya...@a.a wrote in message
news:hboui3$1bb...@digitalmars.com...
AJa...@nospam.net wrote in message
news:hbor97$155...@digitalmars.com...
Nick Sabalauskya...@a.a wrote in message
news:hbonj3$u3...@digitalmars.com...
AJa...@nospam.net wrote in
Don wrote:
Andrei Alexandrescu wrote:
Bill Baxter wrote:
On Wed, Oct 21, 2009 at 6:35 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
3. Remove some element from the container and give it to me
E removeAny();
4. Add an element to the container is possible
bool add(E);
I
Walter Bright Wrote:
Yigal Chripun wrote:
On 22/10/2009 02:01, Walter Bright wrote:
Yigal Chripun wrote:
the only valid IMO use case for header files is for linking libs - the
compiler can handle just find binary formats for that.
I was originally going to go with a binary format for
Mike James f...@bar.com wrote in message
news:hbp7le$220...@digitalmars.com...
I say we should get rid of vowels - it worked for the ancient egyptians :-)
Next thing you know someone will propose eliminating braces and just
using whitespace to denote blocks. It's utter madness.
Or get rid
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On Oct 22, 09 12:29, AJ wrote:
Adam D. Ruppedestructiona...@gmail.com wrote in message
news:mailman.228.1256181155.20261.digitalmar...@puremagic.com...
On Wed, Oct 21, 2009 at
AJ a...@nospam.net wrote in message news:hbp6ka$1uv...@digitalmars.com...
Nick Sabalausky a...@a.a wrote in message
news:hboum3$1bh...@digitalmars.com...
AJ a...@nospam.net wrote in message
news:hbosh1$17l...@digitalmars.com...
Nick Sabalausky a...@a.a wrote in message
KennyTM~ kenn...@gmail.com wrote in message
news:hbp924$24h...@digitalmars.com...
On Oct 22, 09 17:31, AJ wrote:
Nick Sabalauskya...@a.a wrote in message
news:hboui3$1bb...@digitalmars.com...
AJa...@nospam.net wrote in message
news:hbor97$155...@digitalmars.com...
Nick
On Thu, Oct 22, 2009 at 11:50 AM, Yigal Chripun yigal...@gmail.com wrote:
I think you misunderstood. the idea is *not* to replace .di header files with
llvm bit-code files.
the idea is to replace d object files lib files with a llvm bit-code
equivalents which does not need additional
AJ wrote:
Mike James f...@bar.com wrote in message
news:hbp7le$220...@digitalmars.com...
I say we should get rid of vowels - it worked for the ancient egyptians :-)
Next thing you know someone will propose eliminating braces and just
using whitespace to denote blocks. It's utter madness.
Or
KennyTM~ kenn...@gmail.com wrote in message
news:hbpa89$27s...@digitalmars.com...
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On Oct 22, 09 12:29, AJ wrote:
Adam D. Ruppedestructiona...@gmail.com wrote in message
In D there are several things to implement and fix that have a priority higher
than tuning the performance of the DMD back-end (a work may be wasted time
anyway). But arrays are common, so the following may interest anyway.
On LDC this synthetic benchmark shows the same run time with both
Ary Borenszweig a...@esperanto.org.ar wrote in message
news:hbpau3$297...@digitalmars.com...
AJ wrote:
Mike James f...@bar.com wrote in message
news:hbp7le$220...@digitalmars.com...
I say we should get rid of vowels - it worked for the ancient egyptians
:-)
Next thing you know someone
bearophile bearophileh...@lycos.com wrote in message
news:hbp5qa$1te...@digitalmars.com...
Walter Bright:
Adam D. Ruppe wrote:
Ifthepointisntplainobviousfromtheabovefewersymbolsmostcertainly
doesNOTmeanalanguageisnecessarilyeasiertoparseSymbolsgiveus
Nick Sabalausky a...@a.a wrote in message
news:hbpa7q$27r...@digitalmars.com...
AJ a...@nospam.net wrote in message
news:hbp6ka$1uv...@digitalmars.com...
Nick Sabalausky a...@a.a wrote in message
news:hboum3$1bh...@digitalmars.com...
AJ a...@nospam.net wrote in message
AJ a...@nospam.net wrote in message news:hbpb1b$29u...@digitalmars.com...
KennyTM~ kenn...@gmail.com wrote in message
news:hbpa89$27s...@digitalmars.com...
OK.
struct S { int a }
int a
void main () {
S s
auto t = s
.a = 1 // ambiguity: Note that .sth means global scope.
AJ a...@nospam.net wrote in message news:hbp85j$238...@digitalmars.com...
Chris Nicholson-Sauls ibisbase...@gmail.com wrote in message
news:hbou95$1al...@digitalmars.com...
AJ wrote:
Nick Sabalausky a...@a.a wrote in message
news:hbonbp$to...@digitalmars.com...
AJ a...@nospam.net wrote in
bearophile wrote:
Tim Matthews:
OOC. I quite like how this one myself personally. http://ooc-lang.org/about
Type of arguments can be stated once:
Vector3f: class {
x, y, z : Float
init: func(x, y, z : Float) {
this x = x // 'this' is called 'self' in some other languages
this y
AJ wrote:
KennyTM~ kenn...@gmail.com wrote in message
news:hbpa89$27s...@digitalmars.com...
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On Oct 22, 09 12:29, AJ wrote:
Adam D. Ruppedestructiona...@gmail.com wrote in
Pelle Månsson:
Personally, I like this:
foreach (i; 0..10) list ~= i;
more. :)
While I like this more:
for (i in 0 .. 10)
list ~= i;
Bye,
bearophile
Nick Sabalausky:
I'm already kicking myself for trying to jump into the middle of yet another
semicolon debate, but...burden of semicolons? Isn't that a bit overstated?
I suppose it depends on the person, but I find it to be every bit as
automatic as reaching for the Shift key when I write
KennyTM~ wrote:
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On Oct 22, 09 12:29, AJ wrote:
Adam D. Ruppedestructiona...@gmail.com wrote in message
news:mailman.228.1256181155.20261.digitalmar...@puremagic.com...
On Wed,
AJ Wrote:
Cons:
1. Makes most source code less comprehensible.
That depends on what parser you have. If you're a basic addict, why you bother
about C family language?
2. Is redundant with the newline designator.
Statements don't end at newline.
3. Is more typing.
Code reuse saves
AJ wrote:
Ary Borenszweig a...@esperanto.org.ar wrote in message
news:hbpau3$297...@digitalmars.com...
AJ wrote:
Mike James f...@bar.com wrote in message
news:hbp7le$220...@digitalmars.com...
I say we should get rid of vowels - it worked for the ancient egyptians
:-)
Next thing you know
AJ wrote:
Cons:
10. Allows one to write hard-to-see do nothings like: for(;;);
That's not allowed in D, for that exact reason. You have to write
for (;;) { }
for a do-nothing loop.
-Lars
AJ wrote:
Nick Sabalausky a...@a.a wrote in message
news:hboum3$1bh...@digitalmars.com...
AJ a...@nospam.net wrote in message
news:hbosh1$17l...@digitalmars.com...
Nick Sabalausky a...@a.a wrote in message
news:hbontv$uq...@digitalmars.com...
If you want to manually write a separate
On Thu, 22 Oct 2009 06:16:50 -0400, AJ a...@nospam.net wrote:
No. And tomorrow (later today after I get done sleeping), I'm going to do
more coding and less newsgrouping! Goodnight.
Oh thank god. (Yes, keep replying, I'm going to see how long I can keep
you away from critical header
Op Thu, 22 Oct 2009 07:44:44 +0200 schreef AJ a...@nospam.net:
Also, referring to your second struct example above, D never has
semicolons directly after a closing curly-brace.
Isn't that ironic!
Kinda far fetched to call that ironic. The struct decleration was already
ended by '}'.
On Oct 22, 09 19:03, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On Oct 22, 09 12:29, AJ wrote:
Adam D. Ruppedestructiona...@gmail.com wrote in message
KennyTM~ wrote:
On Oct 22, 09 19:03, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On Oct 22, 09 12:29, AJ wrote:
Adam D. Ruppedestructiona...@gmail.com wrote in message
KennyTM~ wrote:
On Oct 22, 09 19:03, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On Oct 22, 09 12:29, AJ wrote:
Adam D. Ruppedestructiona...@gmail.com wrote in message
On Thu, 22 Oct 2009 09:07:47 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Don wrote:
Andrei Alexandrescu wrote:
Bill Baxter wrote:
On Wed, Oct 21, 2009 at 6:35 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
3. Remove some element from the container and
On Oct 22, 09 21:12, Ary Borenszweig wrote:
KennyTM~ wrote:
On Oct 22, 09 19:03, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On Oct 22, 09 12:29, AJ wrote:
Adam D.
On Thu, Oct 22, 2009 at 12:46:50AM -0700, Walter Bright wrote:
(Fixed that for you!)
hehehe :)
--
Adam D. Ruppe
http://arsdnet.net
On Oct 22, 09 21:17, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 19:03, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On Oct 22, 09 12:29, AJ wrote:
Adam D.
KennyTM~ wrote:
On Oct 22, 09 21:17, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 19:03, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On Oct 22, 09 12:29, AJ wrote:
Adam D.
KennyTM~ wrote:
On Oct 22, 09 21:12, Ary Borenszweig wrote:
KennyTM~ wrote:
On Oct 22, 09 19:03, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On Oct 22, 09 12:29, AJ wrote:
Adam D.
Nick B, el 22 de octubre a las 19:35 me escribiste:
Leandro Lucarella wrote:
Don, el 21 de octubre a las 09:46 me escribiste:
All my public email addresses are fake. Bugzilla is just spam bait.
It clearly comes from a more innocent age. I once made the mistake
of submitting a bug to gcc.
On Oct 22, 09 21:36, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 21:12, Ary Borenszweig wrote:
KennyTM~ wrote:
On Oct 22, 09 19:03, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On Oct 22, 09 21:35, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 21:17, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 19:03, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
news:hbopns$125...@digitalmars.com...
On
On Thu, 22 Oct 2009 17:32:00 +0400, Leandro Lucarella llu...@gmail.com
wrote:
Nick B, el 22 de octubre a las 19:35 me escribiste:
Leandro Lucarella wrote:
Don, el 21 de octubre a las 09:46 me escribiste:
All my public email addresses are fake. Bugzilla is just spam bait.
It clearly comes
On Thu, 22 Oct 2009 09:32:00 -0400, Leandro Lucarella llu...@gmail.com
wrote:
Nick B, el 22 de octubre a las 19:35 me escribiste:
Leandro Lucarella wrote:
Don, el 21 de octubre a las 09:46 me escribiste:
All my public email addresses are fake. Bugzilla is just spam bait.
It clearly comes
KennyTM~ wrote:
On Oct 22, 09 21:36, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 21:12, Ary Borenszweig wrote:
KennyTM~ wrote:
On Oct 22, 09 19:03, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 13:57, AJ wrote:
KennyTM~kenn...@gmail.com wrote in message
Refer to:
http://www.digitalmars.com/d/2.0/struct.html
and scroll down to the last section, Nested Structs. A struct defined
inside a function has a hidden pointer to that function's stack frame
and therefore can use function's local variables.
Nested classes do a similar trick, but for
On Thu, 22 Oct 2009 18:07:15 +0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Refer to:
http://www.digitalmars.com/d/2.0/struct.html
and scroll down to the last section, Nested Structs. A struct defined
inside a function has a hidden pointer to that function's stack frame
On Oct 22, 09 21:51, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 21:36, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 21:12, Ary Borenszweig wrote:
KennyTM~ wrote:
On Oct 22, 09 19:03, Pelle Månsson wrote:
KennyTM~ wrote:
On Oct 22, 09 13:57, AJ wrote:
Regarding recent discussions in Bugzilla: I wonder if we could somehow define
a super-efficient struct opEquals that performs introspection and only tests
expensive members if it's necessary. For example, here is a simple case of it:
enum opEqualsMixin = q{
bool opEquals(typeof(this) rhs) {
dsimcha:
Similar stuff could be done for a generic opCmp that gives a
struct an arbitrary total ordering as long as all of its members have a total
ordering.
I have a similar structCmp in my dlibs, it's used by the Record/record (similar
to the Tuple/tuple of Phobos2). It works recursively.
bearophile wrote:
Andrei Alexandrescu:
With nested structs, however, you can't do much. You can pass them to a
template, but I can't see some solid use cases there. My understanding
is that nested structs have been implemented for completeness and
consistency with nested classes.
Any good
dsimcha wrote:
Regarding recent discussions in Bugzilla: I wonder if we could somehow define
a super-efficient struct opEquals that performs introspection and only tests
expensive members if it's necessary. For example, here is a simple case of it:
enum opEqualsMixin = q{
bool
dsimcha wrote:
Regarding recent discussions in Bugzilla: I wonder if we could somehow define
a super-efficient struct opEquals that performs introspection and only tests
expensive members if it's necessary.
The compiler should be doing this. It's the way to fix the Bugzilla bug.
There should
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
Of course, we could get even fancier. We could recursively introspect
struct
types and use various heuristics to calculate the optimal comparison order
at
compile time. Similar stuff could be done for a
http://bartoszmilewski.wordpress.com/2009/10/21/what-does-haskell-have-to-do-with-c/
Bartosz's second part of 'Template Metaprogramming Made Easy (Huh?)',
its quite a read :)
Jeremie Pelletier:
However I don't think having a closure for that struct is really needed,
nested functions already perform that task very well, and I use those
quite often.
That's why I have said static nested structs, they are like nested structs,
but they don't have the extra field.
Jeremie Pelletier Wrote:
http://bartoszmilewski.wordpress.com/2009/10/21/what-does-haskell-have-to-do-with-c/
Bartosz's second part of 'Template Metaprogramming Made Easy (Huh?)',
its quite a read :)
Jeremie, you are a champion and a scholar. Thanks for changing the topic.
Justin
Tomas Lindquist Olsen Wrote:
This locks D to the LLVM backend, things like that is never a good idea.
you could say the same thing about .net and Java -
Java locks you to .class files and .net locks you to assemblies.
there are many JVMs from different vendors for different platforms which
On 2009-10-22 16:33:01 +0200, Jeremie Pelletier jerem...@gmail.com said:
bearophile wrote:
Andrei Alexandrescu:
With nested structs, however, you can't do much. You can pass them to a
template, but I can't see some solid use cases there. My understanding
is that nested structs have been
On Thu, 22 Oct 2009 19:59:04 +0400, Yigal Chripun yigal...@gmail.com
wrote:
Tomas Lindquist Olsen Wrote:
This locks D to the LLVM backend, things like that is never a good idea.
you could say the same thing about .net and Java -
Java locks you to .class files and .net locks you to
bearophile wrote:
Andrei Alexandrescu:
With nested structs, however, you can't do much. You can pass them to a
template, but I can't see some solid use cases there. My understanding
is that nested structs have been implemented for completeness and
consistency with nested classes.
Any good
Hello aJ,
Well I can do the same thing with pragma or compiler switch in C++.
It doesn't mean that thing will work if 32-bit ints have to be aligned
on 32-bit boundaries. While nice to have one syntax to do that, it
doesn't fix the problem (which I haven't expressed correctly
probably). What
Fawzi Mohamed wrote:
On 2009-10-22 16:33:01 +0200, Jeremie Pelletier jerem...@gmail.com said:
bearophile wrote:
Andrei Alexandrescu:
With nested structs, however, you can't do much. You can pass them
to a template, but I can't see some solid use cases there. My
understanding is that nested
Hello aJ,
You sound angry that your feature is not a fit for my development
process.
I think the frustration here is that you seem to be saying that you can't
do something in D that you want to do but we have yet to figure out what
it is. Every thing I have seen you ask for is already
Hello aJ,
BCS n...@anon.com wrote in message
news:a6268ffbb078cc2081280f1...@news.digitalmars.com...
I will hold that the full source or webpage like documentation will
do better in all cases than a header file. The first for where the
details matter and the second for all other cases because
KennyTM~:
Please people, let's edit emails a little, so you don't carry around 30 KB of
useless text :-)
And if all you need is a
re-syntax-ized D with optional semicolon, there is already one here.
It's called Delight.
In F# you have the light syntax, that you can activate with the
dsimcha wrote:
== Quote from grauzone (n...@example.net)'s article
Andrei Alexandrescu wrote:
I'd really like to know why scope x = new X(); is unsafe, while
encouraging doing exactly the same with structs seems to be a perfectly
fine idea. Allocating structs on the stack is obviously not any
dsimcha wrote:
== Quote from grauzone (n...@example.net)'s article
Andrei Alexandrescu wrote:
I'd really like to know why scope x = new X(); is unsafe, while
encouraging doing exactly the same with structs seems to be a perfectly
fine idea. Allocating structs on the stack is obviously not any
Hello Yigal,
On 22/10/2009 00:57, BCS wrote:
Hello Yigal,
As you said, what is needed is a better lib format. we already have
DDL NOW which already has most of what you described above. D can
also take advantage of the LLVM framework.
Does DDL or LLVM work to generate monolithic
On Thu, Oct 22, 2009 at 9:44 AM, bearophile bearophileh...@lycos.com wrote:
KennyTM~:
Please people, let's edit emails a little, so you don't carry around 30 KB of
useless text :-)
And if all you need is a
re-syntax-ized D with optional semicolon, there is already one here.
It's called
1 - 100 of 196 matches
Mail list logo