On Tue, Jul 27, 2010 at 19:03, Sean Kelly wrote:
> The next release, 2.048, should bring things in line with TDPL. I had
> meant to do this for 2.047, but was too busy with other work to finish in
> time.
>
Do you mean, indexing tuples directly by a CT value as in msg[1]? Because
that was the o
"bearophile" wrote in message
news:i2nqs5$js...@digitalmars.com...
> It seems to work, on 2.042, and on dmd 2.047:
> http://ideone.com/dcsK3
>
> Bye,
> bearophile
That's because my original example accidentally made Foo an uninstantiated
class template, so the compiler never bothered to check t
"Nick Sabalausky" wrote in message
news:i2o9ev$1e4...@digitalmars.com...
> "bearophile" wrote in message
> news:i2nqs5$js...@digitalmars.com...
>> It seems to work, on 2.042, and on dmd 2.047:
>> http://ideone.com/dcsK3
>>
>> Bye,
>> bearophile
>
> That's because my original example accidentall
On Tuesday, July 27, 2010 17:24:27 Nick Sabalausky wrote:
> On 2.047, this:
>
> import std.algorithm;
> import std.array;
> void main()
> {
> string[] result =
> array(
> filter!( (string a) { return a != "b"; } )
> (["a", "b", "c"])
> );
> }
>
> Gives
On 2.047, this:
import std.algorithm;
import std.array;
void main()
{
string[] result =
array(
filter!( (string a) { return a != "b"; } )
(["a", "b", "c"])
);
}
Gives me this:
testfilter.d(6): Error: template std.array.array(Range) if
(isForwardRange!
It seems to work, on 2.042, and on dmd 2.047:
http://ideone.com/dcsK3
Bye,
bearophile
On Tuesday, July 27, 2010 16:25:28 Nick Sabalausky wrote:
> In converting some D1 code to D2, I noticed this doesn't seem to work
> anymore:
>
> module mymodule;
> class Foo()
> {
> void bar(string s) {...}
>
> void foo()
> {
> string str = "hello";
> str.bar();
>
In converting some D1 code to D2, I noticed this doesn't seem to work
anymore:
module mymodule;
class Foo()
{
void bar(string s) {...}
void foo()
{
string str = "hello";
str.bar();
}
}
In D1 that works fine, but in D2 (2.047) it complains that it can't find
"mym
On 28.07.2010 3:06, Nick Sabalausky wrote:
"Nick Sabalausky" wrote in message
news:i2no7g$eu...@digitalmars.com...
Trying to convert some D1 code to D2:
On 2.047, I'm trying to do this:
import std.string;
void foo(string str)
{
str =
std.algorithm.map!(
(char a) { return inPattern(a,
"Nick Sabalausky" wrote in message
news:i2no7g$eu...@digitalmars.com...
> Trying to convert some D1 code to D2:
>
> On 2.047, I'm trying to do this:
>
> import std.string;
> void foo(string str)
> {
> str =
> std.algorithm.map!(
> (char a) { return inPattern(a, [digits, letters])? a : '_'; }
>
Trying to convert some D1 code to D2:
On 2.047, I'm trying to do this:
import std.string;
void foo(string str)
{
str =
std.algorithm.map!(
(char a) { return inPattern(a, [digits, letters])? a : '_'; }
)(str);
}
And I'm getting:
delegate std.algorithm.__dgliteral1 cannot access frame of f
On 2010-07-26 14:27, Rory Mcguire wrote:
Hi,
I'm not sure this is in bugzilla, I tried finding something mentioning it
but coudn't.
Compiling the below code results in the dmd compiler printing:
struct_bad_error.d(8): Error: 'this' is only defined in non-static member
functions, not inner
The next release, 2.048, should bring things in line with TDPL. I had meant to
do this for 2.047, but was too busy with other work to finish in time.
dcoder wrote:
> Hello. Here's a short program that works in a dos window:
>
> import std.stdio;
>
> void main() {
>
> writef( "What is your name?");
>
> string name = readln();
> writefln( "Hello " ~ name);
> }
>
> The program prints a prompt without a newline and the user enters a nam
== Quote from Rory Mcguire (rjmcgu...@gm_no_ail.com)'s article
> Philippe Sigaud wrote:
> >> > Also, in my case, the return; in writer must be commented out, or DMD
> >> > complains it cannot be reached.
> >>
> >
> >
> >>
> >> Interesting, I didn't have to comment out return; using dmd 2.047 on
> >
Hello. Here's a short program that works in a dos window:
import std.stdio;
void main() {
writef( "What is your name?");
string name = readln();
writefln( "Hello " ~ name);
}
The program prints a prompt without a newline and the user enters a name and a
greeting is printed.
The same pr
Philippe Sigaud wrote:
> On Tue, Jul 27, 2010 at 11:25, Rory Mcguire
> wrote:
>
>>
>> > Also, in my case, the return; in writer must be commented out, or DMD
>> > complains it cannot be reached.
>>
>
>
>>
>> Interesting, I didn't have to comment out return; using dmd 2.047 on
>> linux
>>
>
>
On Tue, Jul 27, 2010 at 11:25, Rory Mcguire wrote:
>
> > Also, in my case, the return; in writer must be commented out, or DMD
> > complains it cannot be reached.
>
>
> Interesting, I didn't have to comment out return; using dmd 2.047 on linux
>
I think I have -w (warnings treated as errors?)
Philippe Sigaud wrote:
> On Mon, Jul 26, 2010 at 19:11, dcoder wrote:
>
>> == Quote from Rory Mcguire (rjmcgu...@gm_no_ail.com)'s article
>> > Dmitry Olshansky wrote:
>>
>
>
> std.typecons.Tuple fields cannot be indexed like arrays, Andrei made a
> mistake. To access field #n, use ._n or .fie
19 matches
Mail list logo