Sorry but all of them are just names for the same thing.
The template metaprogramming that is possibile in C++ is actually due to
some loopholes
in the language definition. In the old days there were some articles in the
C++ Report
when this technique was discovered.
D does provide a better
On Thursday 21 October 2010 23:18:15 Gour wrote:
Hello!
Few days ago I sent a short post to Linux Agora site explaining why
I'm not participating any longer in 'learning Haskell' reading group
and suggesting D as possible target of one of the future groups.
However, it looks that some are
Jonathan M Davis wrote:
On Thursday 21 October 2010 15:01:21 Walter Bright wrote:
5. generally follow along with the C++ one so that they can be maintained
in tandem
Does this mean that you want a pseudo-port of the C++ front end's lexer to D for
this? Or are you looking for just certain
Jonathan M Davis wrote:
In any case, that poster seems knowledgeable enough that I don't see much point
in arguing with him. His opinion obviously differs from that of most of us on
this list, but it's generally based quite soundly on facts, so only time will
prove him wrong.
Sure, but it
On Thursday 21 October 2010 23:55:42 Walter Bright wrote:
Jonathan M Davis wrote:
On Thursday 21 October 2010 15:01:21 Walter Bright wrote:
5. generally follow along with the C++ one so that they can be
maintained in tandem
Does this mean that you want a pseudo-port of the C++ front
On Thu, 21 Oct 2010 23:51:20 -0700
Jonathan == Jonathan M Davis wrote:
Jonathan In any case, that poster seems knowledgeable enough that I
Jonathan don't see much point in arguing with him. His opinion
Jonathan obviously differs from that of most of us on this list, but
Jonathan it's generally
Gary Whatmore wrote:
What's the difference between:
type polymorphism
parametric polymorphism
ad-hoc polymorphism
generics
c++ templates
d style templates
other templates (are there?)
Does Java and C# have type polymorphism or generics or templates? What's
the real name and how to
retard wrote:
Thu, 21 Oct 2010 16:00:11 -0400, Gary Whatmore wrote:
What's the difference between:
type polymorphism
parametric polymorphism
ad-hoc polymorphism
generics
c++ templates
d style templates
other templates (are there?)
Does Java and C# have type polymorphism or
Jonathan M Davis wrote:
On Thursday 21 October 2010 15:12:41 Ellery Newcomer wrote:
and how about
6. ctfe compatible
?
That would seem like a good idea (though part of me cringes at the idea of a
program specifically running the lexer (and possibly the parser) as part of its
own
Jonathan M Davis wrote:
...
Okay. Good to know. I'll start looking at the C++ front end some time in
the next few days, but like I said, I really don't know how much time I'm
going to be able to spend on it, so it won't necessarily be quick.
However, porting logic should be much faster than
On Friday 22 October 2010 00:09:31 Walter Bright wrote:
Jonathan M Davis wrote:
In any case, that poster seems knowledgeable enough that I don't see much
point in arguing with him. His opinion obviously differs from that of
most of us on this list, but it's generally based quite soundly on
Fri, 22 Oct 2010 09:22:52 +0200, Lutger wrote:
retard wrote:
Thu, 21 Oct 2010 16:00:11 -0400, Gary Whatmore wrote:
What's the difference between:
type polymorphism
parametric polymorphism
ad-hoc polymorphism
generics
c++ templates
d style templates
other templates (are there?)
Thu, 21 Oct 2010 20:05:58 -0700, Walter Bright wrote:
retard wrote:
Thu, 21 Oct 2010 19:30:50 -0400, bearophile wrote:
retard:
- Safety features: it misses integral overflow tests and static
contract checking (and many other things done by C lint tools, etc).
The list was describing
Walter Bright дµ½:
As we all know, tool support is important for D's success. Making tools
easier
to build will help with that.
To that end, I think we need a lexer for the standard library -
std.lang.d.lex.
It would be helpful in writing color syntax highlighting filters, pretty
Walter Bright дµ½:
Jonathan M Davis wrote:
On Thursday 21 October 2010 15:01:21 Walter Bright wrote:
5. generally follow along with the C++ one so that they can be maintained
in tandem
Does this mean that you want a pseudo-port of the C++ front end's lexer to
D for
this? Or are
dolive дµ½:
Walter Bright дµ½:
As we all know, tool support is important for D's success. Making tools
easier
to build will help with that.
To that end, I think we need a lexer for the standard library -
std.lang.d.lex.
It would be helpful in writing color syntax
dolive дµ½:
Walter Bright дµ½:
As we all know, tool support is important for D's success. Making tools
easier
to build will help with that.
To that end, I think we need a lexer for the standard library -
std.lang.d.lex.
It would be helpful in writing color syntax
Fri, 22 Oct 2010 00:33:15 -0700, Jonathan M Davis wrote:
On Friday 22 October 2010 00:09:31 Walter Bright wrote:
Jonathan M Davis wrote:
In any case, that poster seems knowledgeable enough that I don't see
much point in arguing with him. His opinion obviously differs from
that of most of
Jonathan M Davis wrote:
Oh, I agree that he's wrong, and I agree that D2 is making serious progress, but
he's got enough of his facts right that I don't think that he can be convinced
by correcting what he's saying. I see value in correcting people if they
misunderstand the situation, but
retard wrote:
What annoys me the most in pro D articles is the author usually tries to
prove (in a naive way) that despite all the deficiencies the language and
tool chain is better even *now* than all of the competition or that the
*potential* is so high that the only logical conclusion is to
Fri, 22 Oct 2010 02:42:49 -0700, Walter Bright wrote:
retard wrote:
Why I think the D platform's risk is so high is because the author
constantly refuses to give ANY estimates on feature schedules.
Would you believe them if I did?
http://en.wikipedia.org/wiki/Software_development_process
Paulo Pinto:
And lets not forget that optimizing Lisp compilers can beat Fortran code,
Only if the Fortran code is very bad :-)
Bye,
bearophile
Andrei:
Hope you agree with yourself :o).
Do I contradict myself? Very well, then I contradict myself, I am large, I
contain multitudes.
--Walt Whitman.
The @tagged attribute for unions is an additive change. Even if you don't
implement it now, people have the freedom to design and think
On 20/10/2010 16:17, dsimcha wrote:
== Quote from Bruno Medeiros (brunodomedeiros+s...@com.gmail)'s
Also, the notion that an intrinsic part of algorithm design is to
understand what kind of data you are going to work was also mentioned in
one of the core curricula courses in my degree (although
On 21/10/2010 09:02, Peter Alexander wrote:
On 20/10/10 2:59 PM, Bruno Medeiros wrote:
I don't mean to offend anyone, but if you CS degree (at least for the
last decade or so), doesn't teach about points 1 and 2 above as part of
core curricula, then it's a pretty crappy CS degree. The same is
Well, you think wrongly. :)
If you look at the top universities worldwide, the majority of them have
only one computer programming undergraduate degree. Sometimes it is
called Computer Science (typical in the US), other times it is called
Computer Engineering, Informatics Engineering,
Why not creating a DLL/so based Lexer/Parser based on the existing DMD
front end.? It could be always up to date. Necessary Steps. functional
wrappers around C++ classes, Implementing the visitor pattern (AST),
create std.lex and std.parse..
my 2 cents
On 22/10/2010 00:01, Walter Bright
On 22-ott-10, at 10:56, retard wrote:
[...]
What annoys me the most in pro D articles is the author usually
tries to
prove (in a naive way) that despite all the deficiencies the
language and
tool chain is better even *now* than all of the competition or that
the
*potential* is so high
On 22/10/2010 03:44, Rainer Deyke wrote:
snip
A 'void' function returns, therefore it conceptually returns a value.
For generic programming, it is useful to treat 'void' as a type like any
other, except that it only has one possible value (and therefore encodes
no information and requires no
He starts with and things they made worse than C++ (such as struct/class
asymmetry, the first is stack-based, the second GCed heap).
Having 2 different keywords for exact same purposes (1 difference and it
doesn't worth mentioning) in a language is good and opposite is bad, with
this kind of
Kagamin Wrote:
Andrei Alexandrescu Wrote:
Terminating threads has always been iffy in all languages that use
native threads. I've discussed with Sean a couple of times about ways to
define a little protocol and API for orderly thread termination. We need
something like a callback
Dnia 22-10-2010 o 00:01:21 Walter Bright newshou...@digitalmars.com
napisał(a):
As we all know, tool support is important for D's success. Making tools
easier to build will help with that.
To that end, I think we need a lexer for the standard library -
std.lang.d.lex. It would be helpful
Tomek Sowiński wrote:
Interesting idea. Here's another: D will soon need bindings for CORBA,
Thrift, etc, so lexers will have to be written all over to grok
interface files. Perhaps a generic tokenizer which can be parametrized
with a lexical grammar would bring more ROI, I got a hunch D's
bearophile wrote:
Andrei Alexandrescu:
2. Find a more intuitive interface for feqrel, i.e. using decimal digits
for precision etc. The definition in std.math: the number of mantissa bits
which are equal in x and y loses 90% of the readership at the word
mantissa. You want something intuitive
On 2010-10-22 17:37, BLS wrote:
Why not creating a DLL/so based Lexer/Parser based on the existing DMD
front end.? It could be always up to date. Necessary Steps. functional
wrappers around C++ classes, Implementing the visitor pattern (AST),
create std.lex and std.parse..
my 2 cents
On
On 10/22/10 14:02 CDT, Tomek Sowiński wrote:
Dnia 22-10-2010 o 00:01:21 Walter Bright newshou...@digitalmars.com
napisał(a):
As we all know, tool support is important for D's success. Making
tools easier to build will help with that.
To that end, I think we need a lexer for the standard
On 10/22/10 14:17 CDT, Walter Bright wrote:
Tomek Sowiński wrote:
Interesting idea. Here's another: D will soon need bindings for CORBA,
Thrift, etc, so lexers will have to be written all over to grok
interface files. Perhaps a generic tokenizer which can be parametrized
with a lexical grammar
On Fri, 22 Oct 2010 06:33:33 -0400, bearophile
bearophileh...@lycos.com wrote:
The @tagged attribute for unions is an additive change. Even if you
don't implement it now, people have the freedom to design and think
about it.
I hope this forum still can be used to discuss aditive changues. We
.Net does the same thing with heap/value objects.
Walter Bright newshou...@digitalmars.com wrote in message
news:i9sipj$68...@digitalmars.com...
so wrote:
He starts with and things they made worse than C++ (such as struct/class
asymmetry, the first is stack-based, the second GCed heap).
Jacob Carlborg d...@me.com wrote in message
news:i9spln$lb...@digitalmars.com...
On 2010-10-22 17:37, BLS wrote:
Why not creating a DLL/so based Lexer/Parser based on the existing DMD
front end.? It could be always up to date. Necessary Steps. functional
wrappers around C++ classes,
retard Wrote:
What annoys me the most in pro D articles is the author usually tries to
prove (in a naive way) that despite all the deficiencies the language and
tool chain bla blah blah
This guy has nothing better to do? Sheesh..
For instance, I'm starting the implementation of a 64-bit
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message
news:i9spsa$ll...@digitalmars.com...
On 10/22/10 14:02 CDT, Tomek Sowinski wrote:
Dnia 22-10-2010 o 00:01:21 Walter Bright newshou...@digitalmars.com
napisal(a):
As we all know, tool support is important for D's success.
Andrei Alexandrescu Wrote:
I have in mind the entire implementation of a simple design, but never
had the time to execute on it. The tokenizer would work like this:
alias Lexer!(
+, PLUS,
-, MINUS,
+=, PLUS_EQ,
...
if, IF,
else, ELSE
...
) DLexer;
Dnia 22-10-2010 o 21:48:49 Andrei Alexandrescu
seewebsiteforem...@erdani.org napisał(a):
On 10/22/10 14:02 CDT, Tomek Sowiński wrote:
Interesting idea. Here's another: D will soon need bindings for CORBA,
Thrift, etc, so lexers will have to be written all over to grok
interface files.
On Fri, 22 Oct 2010 11:56:19 +0300, retard r...@tard.com.invalid wrote:
What annoys me the most in pro D articles is the author usually tries to
prove (in a naive way) that despite all the deficiencies the language and
tool chain is better even *now* than all of the competition or that the
On 10/22/10 16:28 CDT, Sean Kelly wrote:
Andrei Alexandrescu Wrote:
I have in mind the entire implementation of a simple design, but never
had the time to execute on it. The tokenizer would work like this:
alias Lexer!(
+, PLUS,
-, MINUS,
+=, PLUS_EQ,
...
if, IF,
== Quote from Gour (g...@atmarama.net)'s article
Hello!
Few days ago I sent a short post to Linux Agora site explaining why
I'm not participating any longer in 'learning Haskell' reading group
and suggesting D as possible target of one of the future groups.
However, it looks that some are
Benchmarks of some efficient C++ data structures (may be tagged with @sealed in
D):
http://msinilo.pl/blog/?p=668
From the post:
Note: couldnt find reserve/resize method for EASTL, thats why map_grow is
the same as map_predict/grow. RDE tries to be as cache friendly as possible
and uses
Ada 95 too has a No_return pragma, see page 12-14 of the PDF file here, it
explains various things:
http://www.adacore.com/2006/02/02/ada-2005-rationale-exceptions-generics-etc-part-6-of-8/
Bye,
bearophile
On 10/22/10 19:24 CDT, bearophile wrote:
Ada 95 too has a No_return pragma, see page 12-14 of the PDF file here, it
explains various things:
http://www.adacore.com/2006/02/02/ada-2005-rationale-exceptions-generics-etc-part-6-of-8/
The one cool and interesting thing about non-returning
Just a lazy note, don't take this too much seriously.
The Computer Language Benchmarks Game (Computer Shootout) has added some
Clojure implementations, they are not tuned and refined yet (probably unlike
the Free Pascal versions). This is one of the problems (fasta), there are two
Free Pascal
bearophile wrote:
A question: Here for example the cheapest C program uses 452 KB of RAM. On
average in the Shootout benchmarks Free Pascal uses less or quite less RAM
than the D programs. Do you know why the Free Pascal programs use so little
RAM?
Pascal doesn't use GC.
Walter Bright:
bearophile wrote:
A question: Here for example the cheapest C program uses 452 KB of RAM. On
average in the Shootout benchmarks Free Pascal uses less or quite less RAM
than the D programs. Do you know why the Free Pascal programs use so little
RAM?
Pascal doesn't use
Walter Bright schrieb:
bearophile wrote:
A question: Here for example the cheapest C program uses 452 KB of
RAM. On average in the Shootout benchmarks Free Pascal uses less or quite less
RAM than the D programs. Do you know why the Free Pascal programs use so
little RAM?
Pascal doesn't use
This is a minor thing, if you aren't interested, ignore it.
The support for underscore in number literals as done in D and Ada is a feature
I like a lot. But you may write:
long x = 1_000_000_000_00;
The usage of underscores there doesn't correspond to the thousands, this may
lead to
Can DMD2 Linux version generate shared libraries yet?
I still have found memories of Pascal (actually Turbo Pascal/Delphi).
Not sure about FreePascal, but I remember Turbo Pascal used to have a better
memory allocator
than C.
In the old days (Windows 3.x) the runtime memory manager has more optimized
than the C compiler
family. Please note I am
On Wed, 2010-10-20 at 22:24 +0100, Russel Winder wrote:
[ . . . ]
Works for me. I'll delay creating a Launchpad project and team, and
establishing a Bazaar branch as the trunk until Andrei gives approval to
the plan ;-)
OK, I created a project on Launchpad.
https://launchpad.net/emacs-d-mode.
On 2010-10-21 23:12, Jeremy Powers wrote:
I had it mostly working, but haven't had a chance to work on it for a
long time. Will see if I can steal some time to look at it again.
What is the current recommended repository to use?
On Thu, Oct 21, 2010 at 1:11 PM, Jacob Carlborgd...@me.com
On Fri, 22 Oct 2010 01:50:56 + (UTC)
%u e...@ee.com wrote:
What is the fastest way to fill a static multidimensional array?
Looping over all dimension's elements sounds inefficient, especially as a
static array is essentially continuous memory.
What is the best practice?
int[2][2][2]
Hello,
Where can one find descriptions of Throwable, Error, Exception? (I mean, how
do you even know they exist?) I could finally guess the constructor must have a
string parameter used for error output.
Also, is it possible to implicitely reuse the superclass's constructor? I had
to write:
E.this performs nothing new. But without it, I get a compiler error:
trial.d(7): Error: constructor trial.E.this no match for implicit
super() call in constructor
Isn't the constructor inherited like other attributes?
I think if you don't provide a constructor a default one is created:
On Fri, 22 Oct 2010 13:00:43 +0200, spir wrote:
Hello,
Where can one find descriptions of Throwable, Error, Exception? (I
mean, how do you even know they exist?) I could finally guess the
constructor must have a string parameter used for error output.
Well, they should be in the
Somehow I find it surprising that this copies the whole array.
arr[] = arr2;
Static arrays are value types.
Although it is somewhat annoying that there is no default value for the
msg parameter in the first constructor, it is pretty easy to use the
mixin templates to overcome the issue:
public mixin template ExceptionCtorMixin() {
this(string msg = null, Throwable next = null) { super(msg,
http://www.digitalmars.com/d/1.0/template.html
..
assert(__traits(isRef, x[i]));
..
static assert(!__traits(compiles, min(3, y) = 10));
These won't compile with my D1 :(
On 2010-10-22 20:57, %u wrote:
http://www.digitalmars.com/d/1.0/template.html
..
assert(__traits(isRef, x[i]));
..
static assert(!__traits(compiles, min(3, y) = 10));
These won't compile with my D1 :(
D1 neither has __traits or auto ref. I guess that the section was
accidentally put in the
== Quote from Jacob Carlborg (d...@me.com)'s article
On 2010-10-22 20:57, %u wrote:
http://www.digitalmars.com/d/1.0/template.html
..
assert(__traits(isRef, x[i]));
..
static assert(!__traits(compiles, min(3, y) = 10));
These won't compile with my D1 :(
D1 neither has __traits or
http://d.puremagic.com/issues/show_bug.cgi?id=5091
--- Comment #5 from Peter Alexander peter.alexander...@gmail.com 2010-10-22
00:43:56 PDT ---
(In reply to comment #4)
I have not once wanted to run both the full application and the unittests at
the same time. when I want to run the
http://d.puremagic.com/issues/show_bug.cgi?id=5086
Don clugd...@yahoo.com.au changed:
What|Removed |Added
Summary|Regression(1.062): Stack|Regression(1.061): Stack
http://d.puremagic.com/issues/show_bug.cgi?id=1023
Austin Hastings ah0801...@yahoo.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=5099
Summary: Add enum size property
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
http://d.puremagic.com/issues/show_bug.cgi?id=5099
bearophile_h...@eml.cc changed:
What|Removed |Added
CC||bearophile_h...@eml.cc
---
http://d.puremagic.com/issues/show_bug.cgi?id=5097
--- Comment #4 from bearophile_h...@eml.cc 2010-10-22 04:43:19 PDT ---
(In reply to comment #2)
Thank you for your comments.
Anyone could define a private tag that doesn't vanish in release mode.
In a union with @tagged the attributes
http://d.puremagic.com/issues/show_bug.cgi?id=5077
--- Comment #3 from bearophile_h...@eml.cc 2010-10-22 04:52:28 PDT ---
(In reply to comment #2)
Thank you for your answers.
This is a misunderstanding of Schwartz sort is supposed to do. D's equivalent
of Python's key argument is not
http://d.puremagic.com/issues/show_bug.cgi?id=5077
--- Comment #4 from bearophile_h...@eml.cc 2010-10-22 04:55:33 PDT ---
Sorry, I have forgotten a Python version of the code:
from random import random, seed
from operator import itemgetter
SortType_none = 0
SortType_sort = 1
http://d.puremagic.com/issues/show_bug.cgi?id=5057
--- Comment #4 from nfx...@gmail.com 2010-10-22 05:12:09 PDT ---
(In reply to comment #2)
I don't see how a class may replace an union.
Variant/Algebraic has to store its data somewhere. Currently it uses some
horrible hack to store it inline
http://d.puremagic.com/issues/show_bug.cgi?id=5097
Don clugd...@yahoo.com.au changed:
What|Removed |Added
CC||clugd...@yahoo.com.au
---
http://d.puremagic.com/issues/show_bug.cgi?id=5100
Summary: -O Degrades performance of loop statements
Product: D
Version: D1 D2
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=5101
Summary: Poorly formed error against non-const template on
const object
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Keywords:
http://d.puremagic.com/issues/show_bug.cgi?id=5101
bearophile_h...@eml.cc changed:
What|Removed |Added
CC||bearophile_h...@eml.cc
---
http://d.puremagic.com/issues/show_bug.cgi?id=5097
--- Comment #6 from bearophile_h...@eml.cc 2010-10-22 10:35:20 PDT ---
Thank you Don and Andrei for all the answers, you are right.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this
http://d.puremagic.com/issues/show_bug.cgi?id=5102
Summary: D1 missing Function Templates with Auto Ref Parameters
Product: D
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
http://d.puremagic.com/issues/show_bug.cgi?id=4670
Tomasz Sowiński tomeks...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=2950
Tomasz Sowiński tomeks...@gmail.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=4234
Pedro Rodrigues pdfrodrig...@gmail.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=3020
--- Comment #3 from Don clugd...@yahoo.com.au 2010-10-22 17:16:07 PDT ---
Created an attachment (id=790)
patch against svn 724
This is a big patch, but it's very simple. When checking for the return type of
functions, the info about whether it
http://d.puremagic.com/issues/show_bug.cgi?id=3020
--- Comment #4 from Don clugd...@yahoo.com.au 2010-10-22 17:23:09 PDT ---
For the initial test case, the error messages are:
test.d(17): Error: writefln is not nothrow
test0.d(13): Error: function test0.test 'test' is nothrow yet may throw
http://d.puremagic.com/issues/show_bug.cgi?id=3925
--- Comment #4 from bearophile_h...@eml.cc 2010-10-22 19:26:06 PDT ---
Here DMD 2.049 doesn't find the error, but it should:
int* foo() {
int x;
int* p = x;
return p;
}
void main() {}
--
Configure issuemail:
http://d.puremagic.com/issues/show_bug.cgi?id=5103
Summary: Container Documentation missing syntax
Product: D
Version: D2
Platform: All
URL: http://digitalmars.com/d/2.0/phobos/std_container.html
OS/Version: All
Status:
90 matches
Mail list logo