According to my reading of the spec, array operations only require []
after the lvalue, not after any of the rvalues. So this should work:
int[3] x, y;
x[] = y * 2; // should work, but currently fails
But in DMD at present, array operations only work if you write [] after
_every_ array.
x[] =
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
> Gurney Halleck wrote:
> > Srsly?!? Its better to censor Walters informative post because the Tango
> > Komintern
> > has no good retort?
> >
> > The dimwits tried to rewrite history once. They edited the title of Dons bug
> > rep
Don wrote:
There are several compiler bugs relating to array operations, and almost
all relate to this issue. I'd like to fix them, but I need to know which
way it is supposed to work.
The [] should be required. I worry that otherwise there will be ambiguous cases
that will cause trouble.
Walter Bright wrote:
Don wrote:
There are several compiler bugs relating to array operations, and
almost all relate to this issue. I'd like to fix them, but I need to
know which way it is supposed to work.
The [] should be required. I worry that otherwise there will be
ambiguous cases that w
On 5/3/10 21:03, Nick Sabalausky wrote:
"Walter Bright" wrote in message
news:hrn5ft$oq...@digitalmars.com...
Nick Sabalausky wrote:
I'm also another person that finds semicolons magically appearing at the
end of statements...even when I use a language that doesn't allow them ;)
It's funny h
On 5/3/10 22:06, Michel Fortin wrote:
On 2010-05-03 15:33:53 -0400, Michel Fortin
said:
On 2010-05-03 05:53:34 -0400, Jacob Carlborg said:
foo((int i) { writeln(i); });
I agree that the semicolon looks out of place for one-line function
bodies.
The semicolon could be made optional for th
On 5/3/10 21:33, Michel Fortin wrote:
On 2010-05-03 05:53:34 -0400, Jacob Carlborg said:
foo((int i) { writeln(i); });
I agree that the semicolon looks out of place for one-line function bodies.
The semicolon could be made optional for the last statement in a block.
Just have it be a statem
On 5/4/10 00:30, Michel Fortin wrote:
On 2010-05-03 18:05:11 -0400, Walter Bright
said:
Nick Sabalausky wrote:
"Walter Bright" wrote in message
news:hrncpk$14t...@digitalmars.com...
Michel Fortin wrote:
That's an argument against returning the value of the last
statement. It's not an argum
On 5/4/10 00:30, Michel Fortin wrote:
On 2010-05-03 18:05:11 -0400, Walter Bright
said:
Nick Sabalausky wrote:
"Walter Bright" wrote in message
news:hrncpk$14t...@digitalmars.com...
Michel Fortin wrote:
That's an argument against returning the value of the last
statement. It's not an argum
int[3] x, y;
x[] = y * 2; // should work, but currently fails
Don't know if this would cause any compiler problems but y could also be a
scalar value.
So requiring the [] would at least be unambiguous to the programmer.
Hmm, maybe if you have two variables named very similarly and you mistyp
On Mon, 03 May 2010 16:01:30 -0700, Andrei Alexandrescu wrote:
> Graham Fawcett wrote:
>> The fact that libxml2/libxslt support not only XML parsing and DOM
>> building, but also XSLT, XPath, XPointer, XInclude, RelaxNG, etc.,
>> means that any homegrown library will be hard-pressed to cover the s
Hello Adam,
An important aspect of mimicing js is I don't really care about the
xml
standard; it tries to figure out whatever ugly crap you throw its way
and makes a few assumptions for html. But, it can be used for generic
xml
stuff too.
That can be handy but can also lead to problems.
--
..
Graham Fawcett wrote:
On Mon, 03 May 2010 16:01:30 -0700, Andrei Alexandrescu wrote:
Graham Fawcett wrote:
The fact that libxml2/libxslt support not only XML parsing and DOM
building, but also XSLT, XPath, XPointer, XInclude, RelaxNG, etc.,
means that any homegrown library will be hard-pressed
RapidXML also uses the Boost license (it's included as part of the Boost
PropertyTree library).
I haven't used it though, so i can't say how i compares to the others.
On Tue, 04 May 2010 09:09:29 -0700, Andrei Alexandrescu wrote:
> Graham Fawcett wrote:
>> On Mon, 03 May 2010 16:01:30 -0700, Andrei Alexandrescu wrote:
>>
>>> Graham Fawcett wrote:
The fact that libxml2/libxslt support not only XML parsing and DOM
building, but also XSLT, XPath, XPoint
Graham Fawcett wrote:
On Tue, 04 May 2010 09:09:29 -0700, Andrei Alexandrescu wrote:
Graham Fawcett wrote:
On Mon, 03 May 2010 16:01:30 -0700, Andrei Alexandrescu wrote:
Graham Fawcett wrote:
The fact that libxml2/libxslt support not only XML parsing and DOM
building, but also XSLT, XPath,
On Tue, 04 May 2010 11:56:31 -0700, Andrei Alexandrescu wrote:
> Graham Fawcett wrote:
>> On Tue, 04 May 2010 09:09:29 -0700, Andrei Alexandrescu wrote:
>>
>>> Graham Fawcett wrote:
On Mon, 03 May 2010 16:01:30 -0700, Andrei Alexandrescu wrote:
> Graham Fawcett wrote:
>> The fac
Don wrote:
Walter Bright wrote:
Don wrote:
There are several compiler bugs relating to array operations, and
almost all relate to this issue. I'd like to fix them, but I need to
know which way it is supposed to work.
The [] should be required. I worry that otherwise there will be
ambiguous
(This I posted in
http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/Function#section2
I add it here so more people could see and comment it.)
I'm new to D. I think D is a great idea, a much needed thing. But I find
its specs are terribly sketchy. With sketchy specs D can't go anywhere,
I thin
Am 02.05.2010 04:56, schrieb Walter Bright:
http://www.drdobbs.com/blog/archives/2010/05/improving_compi.html
The next dmd update is getting the fruits of this.
do you think that something like this is also doable to the syntax
analyse phase - so that parts of the parsed file can be syntax-co
Walter Bright wrote:
Don wrote:
Walter Bright wrote:
Don wrote:
There are several compiler bugs relating to array operations, and
almost all relate to this issue. I'd like to fix them, but I need to
know which way it is supposed to work.
The [] should be required. I worry that otherwise the
On Tue, 04 May 2010 16:51:57 -0400, Rick Trelles
wrote:
[snip]
I'd recommend reading the D language documentation on the Digital Mars
website.
in, out, ref and lazy are on the functions page:
http://www.digitalmars.com/d/2.0/function.html
const, immutable, scope, inout are all listed on
Walter Bright wrote:
Don wrote:
Walter Bright wrote:
Don wrote:
There are several compiler bugs relating to array operations, and
almost all relate to this issue. I'd like to fix them, but I need to
know which way it is supposed to work.
The [] should be required. I worry that otherwise the
Hi folks,
I just read a provocative critique of a blog article comparing C++ to
Lisp:
http://funcall.blogspot.com/2010/05/c-vs-lisp.html
I've enjoyed using Lisp languages in the past, and appreciate that D
offers a lot of metaprogramming features that could probably result in a
cleaner, short
On 05/04/2010 03:32 PM, Graham Fawcett wrote:
Hi folks,
I just read a provocative critique of a blog article comparing C++ to
Lisp:
http://funcall.blogspot.com/2010/05/c-vs-lisp.html
I've enjoyed using Lisp languages in the past, and appreciate that D
offers a lot of metaprogramming features t
On 2010-05-04 12:09:29 -0400, Andrei Alexandrescu
said:
Graham Fawcett wrote:
By "adapt" do you mean writing a wrapper for an existing library, or
translating the source code of the library into D?
What constitutes a "generous license" in this context? (For what it's
worth, libxml2 is under
On 05/05/10 08:19, Andrei Alexandrescu wrote:
In the same vein, probably it's time to bite the bullet and require
@property for parens-less function calls.
Andrei
Agreed. Is there any word on rewriting things like `fooInstance.prop +=
3` for @properties?
Michel Fortin wrote:
On 2010-05-04 12:09:29 -0400, Andrei Alexandrescu
said:
Graham Fawcett wrote:
By "adapt" do you mean writing a wrapper for an existing library, or
translating the source code of the library into D?
What constitutes a "generous license" in this context? (For what it's
wo
dmd D 2.045 improves the built-in unit tests resuming their run when they fail
(it reports only the first failed assert for each unit test).
There are many features that today a professional unittest system is expected
to offer, I can write a long list. But in the past I have explained that it's
On 2010-05-04 19:41:39 -0400, Andrei Alexandrescu
said:
Anyway, just in case, would you be interested in an XML tokenizer and
simple DOM following this model?
http://michelf.com/docs/d/mfr/xmltok.html
http://michelf.com/docs/d/mfr/xml.html
At the base is a pull parser and an event p
On 2010-05-04 21:24:50 -0400, bearophile said:
There are ways to partially implement this for run-time asserts, but badly:
void throws(Exceptions, TCallable, string filename=__FILE__, int line=__LINE__)
(lazy TCallable callable) {
try
callable();
catch (Exception e)
On Tue, 04 May 2010 21:55:53 -0400, Michel Fortin
wrote:
// String version: can slice
string readUntil(isAtEndPredicate)(ref string input) {
string savedInput;
while (!input.empty && isAtEndPredicate(input.front)) {
input.p
32 matches
Mail list logo