Am Fri, 10 Apr 2015 14:04:39 +
schrieb Ola Fosheim Grøstad
ola.fosheim.grostad+dl...@gmail.com:
On Friday, 10 April 2015 at 10:28:03 UTC, Walter Bright wrote:
That's what ref counting is about.
That would require pervasive ref-counting.
You make is sound like there was an alternative
Hi,
Is it possible to write somehow shorter using formatted output
and other library functions?
-
import std.stdio, std.range;
void main() {
auto a = iota(100, 201);
writefln(%(;; %(%s, %),\n%)., [
a[0 .. 15],
a[15 .. 30],
On Saturday, 11 April 2015 at 19:08:50 UTC, Marco Leise wrote:
Am Sat, 11 Apr 2015 18:28:35 +
schrieb Paul D Anderson claude.re...@msnmail.com:
Is there a way to return the name of a function (a string)
from a pointer to that function?
Function pointer example from D Reference:
---
int
Am Sat, 11 Apr 2015 18:28:35 +
schrieb Paul D Anderson claude.re...@msnmail.com:
Is there a way to return the name of a function (a string) from a
pointer to that function?
Function pointer example from D Reference:
---
int function() fp;
void test()
{
static int a = 7;
Paul D Anderson:
Is there a way to return the name of a function (a string) from
a pointer to that function?
Perhaps creating a string[void*] AA and initializing with all the
function pointers you care about.
Bye,
bearophile
Parsers unique duplicated strings via a name table:
string udup(string s, ref string[string] nameTable)
{
if(s in nameTable)return nameTable[s];
string s1=s.dup;
nameTable[s1]=s1;
return s1;
}
This way you avoid extra duplicates. You can also try to free
file content manually when it's
On 11 April 2015 at 12:27, weaselcat via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Saturday, 11 April 2015 at 10:00:45 UTC, Iain Buclaw wrote:
On 10 April 2015 at 21:19, Adam D. Ruppe via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Friday, 10 April 2015 at 19:08:13 UTC,
Is there a way to return the name of a function (a string) from a
pointer to that function?
Function pointer example from D Reference:
---
int function() fp;
void test()
{
static int a = 7;
static int foo() { return a + 3; }
fp = foo;
}
void bar()
{
test();
int i = fp();
Hi.
Two questions:
1. On startup I load various indexes from file storage into
memory in the shared static this segment, and I would like to
access these from threads serving web requests. The data can be
considered immutable once loaded.
What is the best way to make this data accessible?
On Saturday, 11 April 2015 at 20:37:17 UTC, anonymous wrote:
On Saturday, 11 April 2015 at 20:10:49 UTC, Dennis Ritchie
wrote:
writefln(%(;; %(%s, %),\n%)., [
a[0 .. 15],
a[15 .. 30],
a[30 .. 45],
a[45 .. 60],
On Saturday, 11 April 2015 at 09:28:46 UTC, Marc Schütz wrote:
It's not acceptable that it happens behind the user's back.
Costly operations must be explicit.
Nothing is costly here.
On Saturday, 11 April 2015 at 18:20:51 UTC, Marco Leise wrote:
Am Fri, 10 Apr 2015 14:04:39 +
schrieb Ola Fosheim Grøstad
ola.fosheim.grostad+dl...@gmail.com:
On Friday, 10 April 2015 at 10:28:03 UTC, Walter Bright wrote:
That's what ref counting is about.
That would require pervasive
On 04/11/2015 01:03 PM, w0rp wrote:
At the moment, auto-decoding isn't part of the language
That won't change anytime soon.
On Saturday, 11 April 2015 at 20:10:49 UTC, Dennis Ritchie wrote:
writefln(%(;; %(%s, %),\n%)., [
a[0 .. 15],
a[15 .. 30],
a[30 .. 45],
a[45 .. 60],
a[60 .. 75],
a[75 .. 90],
Sorry to open yet another topic.
I'm repeatedly finding myself in situations where I write functions like
this.
private @property bool empty() const @safe pure nothrow @nogc
{
return impl is null || !impl.count;
}
This is obviously a joke, because the compiler very well
https://issues.dlang.org/show_bug.cgi?id=14358
yebblies yebbl...@gmail.com changed:
What|Removed |Added
CC||yebbl...@gmail.com
On 11/04/2015 6:09 p.m., Rashad Vinshy wrote:
On Saturday, 11 April 2015 at 05:45:10 UTC, Rikki Cattermole wrote:
Thats nice. Now where is the source code?
I would like to know what I do to contribute the library? Is there a
site I should upload to or should I start a git repository?
On Saturday, 11 April 2015 at 07:28:50 UTC, Rikki Cattermole
wrote:
On 11/04/2015 7:24 p.m., jkpl wrote:
On Saturday, 11 April 2015 at 05:45:10 UTC, Rikki Cattermole
wrote:
On 11/04/2015 5:43 p.m., Rashad Vinshy wrote:
CSGL:
I would like to announce the release of my beta library for
D!
On 4/11/2015 2:28 AM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net wrote:
It's not acceptable that it happens behind the user's back. Costly operations
must be explicit.
Don't know of a better solution.
https://issues.dlang.org/show_bug.cgi?id=14361
yebblies yebbl...@gmail.com changed:
What|Removed |Added
CC||yebbl...@gmail.com
https://issues.dlang.org/show_bug.cgi?id=14363
yebblies yebbl...@gmail.com changed:
What|Removed |Added
CC||yebbl...@gmail.com
On Saturday, 11 April 2015 at 05:45:10 UTC, Rikki Cattermole
wrote:
On 11/04/2015 5:43 p.m., Rashad Vinshy wrote:
CSGL:
I would like to announce the release of my beta library for D!
What is the best plan of action at this point to contribute it
to the D
community? (the library still needs
https://issues.dlang.org/show_bug.cgi?id=14378
yebblies yebbl...@gmail.com changed:
What|Removed |Added
CC||yebbl...@gmail.com
I was thinking about this again, and how the first 'ref' would
create a copy in order to keep the object around. At first I
thought I didn't like that, but then I realised that it's
actually not far from what I wanted for taking r-values by
reference. I commonly write functions which take
On 4/11/2015 2:18 AM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net wrote:
On Friday, 10 April 2015 at 21:26:14 UTC, Walter Bright wrote:
On 4/10/2015 11:28 AM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net wrote:
Example:
void foo() @safe {
RCArray!int arr = [0,1,2];
{
int*
On Friday, 10 April 2015 at 22:55:23 UTC, Nordlöw wrote:
On Friday, 10 April 2015 at 15:36:42 UTC, John Colvin wrote:
if (TL.length == 1 isInputRange!(typeof(TL[0])))
Why not use isStaticArray instead of isInputRange here?
Because that would be completely different. Static arrays aren't
On Saturday, 11 April 2015 at 05:43:14 UTC, Rashad Vinshy wrote:
CSGL:
I would like to announce the release of my beta library for D!
What is the best plan of action at this point to contribute it
to the D community? (the library still needs debugging and
optimization support, I've only
https://issues.dlang.org/show_bug.cgi?id=14439
Issue ID: 14439
Summary: aa's are essentially unusable in @safe contexts
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: major
On 11/04/2015 8:34 p.m., jkpl wrote:
On Saturday, 11 April 2015 at 07:28:50 UTC, Rikki Cattermole wrote:
On 11/04/2015 7:24 p.m., jkpl wrote:
On Saturday, 11 April 2015 at 05:45:10 UTC, Rikki Cattermole wrote:
On 11/04/2015 5:43 p.m., Rashad Vinshy wrote:
CSGL:
I would like to announce the
On Saturday, 11 April 2015 at 09:05:19 UTC, Nordlöw wrote:
On Saturday, 11 April 2015 at 07:18:26 UTC, John Colvin wrote:
Why not use isStaticArray instead of isInputRange here?
Because that would be completely different. Static arrays
aren't even input ranges...
Ahh, my mistake.
Could
On Saturday, 11 April 2015 at 09:15:19 UTC, Martin Nowak wrote:
On Friday, 10 April 2015 at 21:26:14 UTC, Walter Bright wrote:
This would be a bad design of an RCO. RCO's must be
constructed to not allow pointers to the payload other than by
ref.
And taking the address of that is already
On Friday, 10 April 2015 at 21:26:14 UTC, Walter Bright wrote:
On 4/10/2015 11:28 AM, Marc =?UTF-8?B?U2Now7x0eiI=?=
schue...@gmx.net wrote:
Example:
void foo() @safe {
RCArray!int arr = [0,1,2];
{
int* p = arr[0]; // legal under new scope rules
This would be a bad design of
https://issues.dlang.org/show_bug.cgi?id=14359
yebblies yebbl...@gmail.com changed:
What|Removed |Added
CC||yebbl...@gmail.com
On Saturday, 11 April 2015 at 07:18:26 UTC, John Colvin wrote:
Why not use isStaticArray instead of isInputRange here?
Because that would be completely different. Static arrays
aren't even input ranges...
Ahh, my mistake.
Could somebody explain when this feature is needed?
On Friday, 10 April 2015 at 23:12:55 UTC, deadalnix wrote:
On Friday, 10 April 2015 at 10:02:01 UTC, Martin Nowak wrote:
On Wednesday, 8 April 2015 at 23:11:08 UTC, Walter Bright
wrote:
http://wiki.dlang.org/DIP77
So someone passes an RCO via ref to avoid the inc/dec, and
because that
On Saturday, 11 April 2015 at 05:45:10 UTC, Rikki Cattermole
wrote:
Thats nice. Now where is the source code?
I would like to know what I do to contribute the library? Is
there a site I should upload to or should I start a git
repository?
BTW, I should have mentioned the goal of the
https://issues.dlang.org/show_bug.cgi?id=14362
yebblies yebbl...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=14359
--- Comment #3 from yebblies yebbl...@gmail.com ---
*** Issue 14362 has been marked as a duplicate of this issue. ***
--
On Friday, 10 April 2015 at 23:04:44 UTC, Andrei Alexandrescu
wrote:
Martin Nowak added recently a nice feature to the Phobos
makefile: by specifying e.g.
make std/stdio.test
only the unittests for std/stdio.d would build and run. This
greatly improves development turnaround for Phobos.
On 11/04/2015 7:24 p.m., jkpl wrote:
On Saturday, 11 April 2015 at 05:45:10 UTC, Rikki Cattermole wrote:
On 11/04/2015 5:43 p.m., Rashad Vinshy wrote:
CSGL:
I would like to announce the release of my beta library for D!
What is the best plan of action at this point to contribute it to the D
https://issues.dlang.org/show_bug.cgi?id=14358
yebblies yebbl...@gmail.com changed:
What|Removed |Added
Summary|DMD should prevent |[SDC] DMD should prevent
On Friday, 10 April 2015 at 15:44:32 UTC, Andrei Alexandrescu
wrote:
We hope to do better than Rust. -- Andrei
Hope does not cut it.
A design that breaks down even on a linked list (e.g. you have to
turn to ref-counted pointers everywhere) and that makes
findByRef(container,node) break
On 2015-04-10 21:02, Idan Arye wrote:
Many of these Vim users are not really Vim users - not in the sense that
Emacs users are Emacs users anyways. Sure, they use Vim - but only
because it's a default editor in Unix-like systems. If Windows Notepad
was the default text they wouldn't have
On Friday, 10 April 2015 at 21:26:14 UTC, Walter Bright wrote:
This would be a bad design of an RCO. RCO's must be constructed
to not allow pointers to the payload other than by ref.
And taking the address of that is already unsafe.
On 10 April 2015 at 21:19, Adam D. Ruppe via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Friday, 10 April 2015 at 19:08:13 UTC, Paulo Pinto wrote:
- Move a method to another class located in another module, while updating
all references to it, including module imports in the new file
Hi,
I just learn about auto ref functions and tried this :
import std.stdio;
auto ref foo(int i, ref float f)
{
if (i f)
{
return i;
}
else
{
return f;
}
}
void main()
{
int i = 1;
float f1 =
In fact I am now thinking it's great...I tried with string
instead of float and got a clear error message. I should have
read the spec more thoroughly.
On Saturday, 11 April 2015 at 10:50:17 UTC, matovitch wrote:
Hello,
The question is in the title. It should be possible for a
finite random access ranges to perform an indexed foreach no ?
I mean like :
foreach(size_t i = 0, auto ref x; R)
{
/*...*/
}
Why are other foreach statements
https://issues.dlang.org/show_bug.cgi?id=14427
Vladimir Panteleev thecybersha...@gmail.com changed:
What|Removed |Added
CC|
Hello,
The question is in the title. It should be possible for a finite
random access ranges to perform an indexed foreach no ? I mean
like :
foreach(size_t i = 0, auto ref x; R)
{
/*...*/
}
Why are other foreach statements overloadable but this one ?
Thanks in advance.
https://issues.dlang.org/show_bug.cgi?id=12422
--- Comment #5 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/128849de37d51ec6cd08860d1db08741bbd82046
Merge pull request #4441
https://issues.dlang.org/show_bug.cgi?id=13390
--- Comment #13 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/e2d774fc85804ce1eabdaf5f526fb287a2d48417
Merge pull request
https://issues.dlang.org/show_bug.cgi?id=14213
--- Comment #5 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/b8627ba4f639f57a079fbba2b93a913d91404f6b
Merge pull request
https://issues.dlang.org/show_bug.cgi?id=14212
--- Comment #8 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/cf57c7529a63ac970167c65cb659d5249a3a1ab9
Merge pull request
https://issues.dlang.org/show_bug.cgi?id=13116
--- Comment #11 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/4d7040a5296a3a5e155b1dd37c0fbad480a2061b
Merge pull request #4463
https://issues.dlang.org/show_bug.cgi?id=14235
--- Comment #4 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/643ca3f02c237631aa4415386e8abd253f4d66bf
Merge pull request #4452
On Saturday, 11 April 2015 at 12:04:06 UTC, matovitch wrote:
On Saturday, 11 April 2015 at 11:24:32 UTC, John Colvin wrote:
On Saturday, 11 April 2015 at 11:03:28 UTC, matovitch wrote:
On Saturday, 11 April 2015 at 10:53:46 UTC, Jakob Ovrum wrote:
On Saturday, 11 April 2015 at 10:50:17 UTC,
https://issues.dlang.org/show_bug.cgi?id=14375
--- Comment #3 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/2dfede5829685a97e58f7d32f1d3b6448b4969e4
Fix issue 14375 - static
https://issues.dlang.org/show_bug.cgi?id=14375
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
On Saturday, 11 April 2015 at 10:14:00 UTC, w0rp wrote:
I think the one thing in the DIP I'm not sure of is the
definition of what is a reference counted object.
I believe it's still defined by DIP74?
http://wiki.dlang.org/DIP74
On Saturday, 11 April 2015 at 10:00:45 UTC, Iain Buclaw wrote:
On 10 April 2015 at 21:19, Adam D. Ruppe via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Friday, 10 April 2015 at 19:08:13 UTC, Paulo Pinto wrote:
- Move a method to another class located in another module,
while updating
https://issues.dlang.org/show_bug.cgi?id=14301
--- Comment #19 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/d7ea0ef8e31e5c431821e079416c56c90c6f3c8e
Merge pull request
https://issues.dlang.org/show_bug.cgi?id=14297
--- Comment #5 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/e7d02844d58b1290b1dfea2528ec20cefd59c4b5
Merge pull request
https://issues.dlang.org/show_bug.cgi?id=14317
--- Comment #6 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/c6b489b4cde70ec194fde21c2603b3e127f51479
Merge pull request #4511
https://issues.dlang.org/show_bug.cgi?id=14197
--- Comment #10 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/9350b01825157f210edc9139c6e1c5c7e985a894
Merge pull request
https://issues.dlang.org/show_bug.cgi?id=14299
--- Comment #4 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/3d8ba6346e92938301c7da036b22f9eb613e3a62
Merge pull request #4501
https://issues.dlang.org/show_bug.cgi?id=14232
--- Comment #22 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/9edd2223950b919a201cf104601f877283cca2bf
Merge pull request #4458
On 04/10/15 17:36, John Colvin via Digitalmars-d-learn wrote:
On Friday, 10 April 2015 at 15:13:54 UTC, Marc Schütz wrote:
Is there a way to turn an array (known at compile time) into a TypeTuple?
For input ranges in general:
import std.range : isInputRange;
template TypeTupleOf(TL...)
https://issues.dlang.org/show_bug.cgi?id=14421
yebblies yebbl...@gmail.com changed:
What|Removed |Added
CC||yebbl...@gmail.com
--- Comment
On Saturday, 11 April 2015 at 10:24:53 UTC, Jakob Ovrum wrote:
http://wiki.dlang.org/Coming_From/C_Plus_Plus_WIP_article
*Un*signed integer overflow isn't undefined in C/C++ either.
— David
https://issues.dlang.org/show_bug.cgi?id=8667
Martin Nowak c...@dawg.eu changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=12359
Martin Nowak c...@dawg.eu changed:
What|Removed |Added
CC||dmitry.o...@gmail.com
---
On Saturday, 11 April 2015 at 15:59:53 UTC, David Nadlinger wrote:
On Saturday, 11 April 2015 at 15:35:47 UTC, w0rp wrote:
[…] (Also LDC?) in druntime and flag all of the symbols like
this appropriately, so that creating executables with
gc-sections will Just Work in some cases without a
https://issues.dlang.org/show_bug.cgi?id=12655
--- Comment #4 from bearophile_h...@eml.cc ---
(In reply to jens.k.mueller from comment #3)
A cumulate returning the same number elements can be written using map.
...
I leave this here for reference and others to decide whether such a function
I've been looking into compiling smaller executables, and the
trick I learned from watching sessions from the last DConf is to
use the KEEP symbol in a linker script with something like
gc-sections. So at the compilation stage, symbols are put in
different sections, a linker script marks some
https://issues.dlang.org/show_bug.cgi?id=14428
Andrei Alexandrescu and...@erdani.com changed:
What|Removed |Added
Status|REOPENED|RESOLVED
On 04/09/2015 01:10 AM, Walter Bright wrote:
http://wiki.dlang.org/DIP77
It's a very interesting proposal to tackle this specific problem.
As with all the scope/lifetime related stuff, I find it extremely
difficult to anticipate all the needs and foresee how this will
integrate with the rest of
https://issues.dlang.org/show_bug.cgi?id=14421
--- Comment #2 from John Colvin john.loughran.col...@gmail.com ---
What I want is a way of writing
char[] foo(char[] args ...)
{
return args.dup;
}
with a guarantee that only one allocation is made.
--
On Friday, 10 April 2015 at 13:47:52 UTC, Kagamin wrote:
On Tuesday, 7 April 2015 at 15:28:21 UTC, jicman wrote:
H... Will you be able to give me an example of what is bad
and then fix that bad to a good? This may be my problem...
maybe
aTUs = AddToTrackerRepeat(aTUs, source.dup, fn, 1,
On Saturday, 11 April 2015 at 17:01:42 UTC, Dennis Ritchie wrote:
Will the STL included in Phobos or is it impossible?
STL won't be included in Phobos, at least as far as I know, but I
believe it should be possible to interface to parts of it with
extern(C++). To do it, you need to create
https://issues.dlang.org/show_bug.cgi?id=14367
--- Comment #4 from bearophile_h...@eml.cc ---
(In reply to Martin Krejcirik from comment #3)
Since -dw is turned on by default, there is no need for -wi by default too.
I'd like warnings by default, regardless what the compiler does regarding
On Saturday, 11 April 2015 at 15:35:47 UTC, w0rp wrote:
[…] (Also LDC?) in druntime and flag all of the symbols like
this appropriately, so that creating executables with
gc-sections will Just Work in some cases without a linker
script?
LDC is shipping with --gc-sections enabled by default
On Saturday, 11 April 2015 at 15:35:47 UTC, w0rp wrote:
From what I just read, __attribute__((used)) in GCC should do
the job, and I think it should be usable from GDC with its
attribute pragmas.
I wouldn't mind having this functionality.
For a long time, I've wanted it in C in those cases
Will the STL included in Phobos or is it impossible?
On 4/10/15 8:45 PM, Daniel Murphy wrote:
Andrei Alexandrescu wrote in message
news:mg94od$1v4g$1...@digitalmars.com...
Can you make a salient argument that this is a step in the right
direction? In that case what's the vision for future steps? Thanks! --
Andrei
This approach makes the
On Sunday, 12 April 2015 at 03:51:03 UTC, Paul D Anderson wrote:
I don't understand why the following code compiles and runs
without an error:
import std.stdio;
mixin template ABC(){
int abc() { return 3; }
}
mixin ABC;
int abc() { return 4; }
void main()
{
writefln(abc() = %s, abc());
On 12/04/2015 7:24 a.m., Laeeth Isharc wrote:
Hi.
Two questions:
1. On startup I load various indexes from file storage into memory in
the shared static this segment, and I would like to access these from
threads serving web requests. The data can be considered immutable once
loaded.
What is
On 4/11/15 4:03 AM, w0rp wrote:
Having thought about it more, I think that is why we cannot put the
range primitives for slices into object.d. Because that makes it
impossible to define the primitives differently, so that no
auto-decoding occurs. At the moment, auto-decoding isn't part of the
On Sunday, 12 April 2015 at 02:54:27 UTC, Rikki Cattermole wrote:
On 12/04/2015 7:24 a.m., Laeeth Isharc wrote:
Hi.
Two questions:
1. On startup I load various indexes from file storage into
memory in
the shared static this segment, and I would like to access
these from
threads serving web
Andrei Alexandrescu wrote in message
news:mgcqml$2e67$1...@digitalmars.com...
This is nice work, but sorry it is hardly conductive to warm fuzzy
feelings. -- Andrei
It's not ideal, just better than what we have now.
On Saturday, 11 April 2015 at 16:02:53 UTC, David Nadlinger wrote:
On Saturday, 11 April 2015 at 10:24:53 UTC, Jakob Ovrum wrote:
http://wiki.dlang.org/Coming_From/C_Plus_Plus_WIP_article
*Un*signed integer overflow isn't undefined in C/C++ either.
— David
I removed the section on
Thanks for the feedback, I think I've incorporated all the
suggested changes.
Also added a section on how D deals with object slicing.
I can't seem to get the compiler to error on dangling else. I
tried the examples in the original PR[1], but they seem to
compile without error with DMD
I don't understand why the following code compiles and runs
without an error:
import std.stdio;
mixin template ABC(){
int abc() { return 3; }
}
mixin ABC;
int abc() { return 4; }
void main()
{
writefln(abc() = %s, abc());
}
Doesn't the mixin ABC create a function with the same
On Saturday, 11 April 2015 at 20:45:25 UTC, Kagamin wrote:
Parsers unique duplicated strings via a name table:
string udup(string s, ref string[string] nameTable)
{
if(s in nameTable)return nameTable[s];
string s1=s.dup;
nameTable[s1]=s1;
return s1;
}
This way you avoid extra
On 4/11/15 12:25 AM, Vladimir Panteleev wrote:
On Friday, 10 April 2015 at 23:04:44 UTC, Andrei Alexandrescu wrote:
Martin Nowak added recently a nice feature to the Phobos makefile: by
specifying e.g.
make std/stdio.test
only the unittests for std/stdio.d would build and run. This greatly
On 4/11/15 5:35 AM, matovitch wrote:
I am not convinced by the dip77, what about raii managed classes with
costly opAssign operator (like in w0rn example) ? The goal of passing an
object by reference is to avoid the copy and here you guess the
parameter is ref-counted and made a (pseudo-)copy ?
On Thursday, 12 April 2012 at 08:11:58 UTC, Andrea Fontana wrote:
On Wednesday, 11 April 2012 at 15:25:56 UTC, Stefan wrote:
On Wednesday, 11 April 2012 at 13:00:45 UTC, Andrea Fontana
wrote:
On Wednesday, 11 April 2012 at 12:46:30 UTC, Andrea Fontana
wrote:
How can I redirect stdout / stderr
https://issues.dlang.org/show_bug.cgi?id=14421
--- Comment #3 from yebblies yebbl...@gmail.com ---
Is there a reason you can't overload and forward the variadic version to the
non-variadic after calling dup?
--
On Saturday, 11 April 2015 at 09:41:07 UTC, Walter Bright wrote:
On 4/11/2015 2:28 AM, Marc =?UTF-8?B?U2Now7x0eiI=?=
schue...@gmx.net wrote:
It's not acceptable that it happens behind the user's back.
Costly operations
must be explicit.
Don't know of a better solution.
How about this?
https://issues.dlang.org/show_bug.cgi?id=14283
--- Comment #6 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/56e59d841a3854afb8509f5930bfa4016fa7443d
Merge pull request #4497
1 - 100 of 158 matches
Mail list logo