On Sun, 09 Nov 2014 22:17:33 +
bearophile via Digitalmars-d-learn
wrote:
> eles:
>
> > I am also strongly in favor of introducing an "uncast". For
> > example, in C++'x const_cast and in D's cast for removing, for
> > example immutability:
> >
> > immutable int* p = ...;
> > int* q = cast(
On 11/09/2014 10:59 AM, tcak wrote:
> When I want to create a system where data types should match
> each other automatically,
'alias this' can do that but unfortunately, the current compiler
supports only one 'alias this' in a user-defined type. I think that
limitation will be gone with 2.067
On Sunday, 9 November 2014 at 21:47:03 UTC, eles wrote:
On Sunday, 9 November 2014 at 19:00:01 UTC, tcak wrote:
I am also strongly in favor of introducing an "uncast". For
example, in C++'x const_cast and in D's cast for removing, for
example immutability:
immutable int* p = ...;
int* q = ca
On Sunday, 9 November 2014 at 16:31:46 UTC, bearophile wrote:
H. S. Teoh:
It's only a bad idea because people abuse assert() where it's
not appropriate.
It's a bad idea because Walter seems unable to understand the
difference between verifying and proving.
Bye,
bearophile
On the other ha
On Sun, Nov 09, 2014 at 09:57:21PM +, eles via Digitalmars-d-learn wrote:
> On Sunday, 9 November 2014 at 16:31:46 UTC, bearophile wrote:
> >H. S. Teoh:
> >
> >>It's only a bad idea because people abuse assert() where it's not
> >>appropriate.
> >
> >It's a bad idea because Walter seems unable
This was Issue 8405 opened by Jonathan M Davis two years ago, I
have added my use cases:
https://issues.dlang.org/show_bug.cgi?id=8405
Bye,
bearophile
eles:
I am also strongly in favor of introducing an "uncast". For
example, in C++'x const_cast and in D's cast for removing, for
example immutability:
immutable int* p = ...;
int* q = cast(int*)p;
I think this is supposed to work:
void main() {
immutable int* p;
int* q = cast()p;
}
On Sun, 09 Nov 2014 21:47:02 +
eles via Digitalmars-d-learn wrote:
> On Sunday, 9 November 2014 at 19:00:01 UTC, tcak wrote:
> > In some cases, I need to cast right hand side expression to
> > left hand side. While it looks/feels simple for basic data
> > types, it requires long lines with
On Sunday, 9 November 2014 at 16:31:46 UTC, bearophile wrote:
H. S. Teoh:
It's only a bad idea because people abuse assert() where it's
not appropriate.
It's a bad idea because Walter seems unable to understand the
difference between verifying and proving.
I fail to see the difference betw
On Sunday, 9 November 2014 at 19:00:01 UTC, tcak wrote:
In some cases, I need to cast right hand side expression to
left hand side. While it looks/feels simple for basic data
types, it requires long lines with duplication when flexible
code is desired to be written.
Example:
int a = 7;
byte
Thanks. Laeeth.
In some cases, I need to cast right hand side expression to left
hand side. While it looks/feels simple for basic data types, it
requires long lines with duplication when flexible code is
desired to be written.
Example:
int a = 7;
byte b;
b = cast( byte )a;
When I want to create a system w
On Sunday, 9 November 2014 at 08:26:59 UTC, Suliman wrote:
I know that a lot of people are using for programming tools
like Sublime. I am one of them. But if for very simple code
it's ok, how to write hard code?
Do you often need debugger when you are writing code? For which
tasks debugger ar
H. S. Teoh:
It's only a bad idea because people abuse assert() where it's
not appropriate.
It's a bad idea because Walter seems unable to understand the
difference between verifying and proving.
Bye,
bearophile
On Sun, Nov 09, 2014 at 04:12:06PM +, bearophile via Digitalmars-d-learn
wrote:
> H. S. Teoh:
>
> >Walter *did* mention recently that he was planning to eventually take
> >advantage of information in assert()'s as optimizer hints. Not sure
> >when this will happen, though, but it seems inevit
H. S. Teoh:
Walter *did* mention recently that he was planning to
eventually take
advantage of information in assert()'s as optimizer hints. Not
sure when
this will happen, though, but it seems inevitable at some point.
And it caused a storm, because it's an awfully bad idea.
Bye,
bearophil
On Sun, Nov 09, 2014 at 02:45:29PM +, bearophile via Digitalmars-d-learn
wrote:
> Laeeth Isharc:
>
> >Walter Bright suggests that a supplementary benefit of using contrats
> >is helping the compiler make optimisations.
>
> I think no D compilers do this, currently. And no one knows when such
Laeeth Isharc:
Walter Bright suggests that a supplementary benefit of using
contrats is helping the compiler make optimisations.
I think no D compilers do this, currently. And no one knows when
such things will be added, if ever.
Bye,
bearophile
On Sun, 09 Nov 2014 09:33:29 -0500
Etienne via Digitalmars-d-learn
wrote:
> I've seen a lot more invalid memory operation errors since the GC calls
> destructors. Letting the GC destroy objects out of order can be the
> issue. We might have to make an associative array of static global flags
>
https://www.youtube.com/watch?v=e2F2pqeMLuw&list=PL4EvMyUrlAJmEfs8l6oW2BlnALiDu7kGy
31 minutes in, Walter Bright suggests that a supplementary
benefit of using contrats is helping the compiler make
optimisations. He uses the example of being able to do faster 32
bit arithmetic when the variab
On Sun, 09 Nov 2014 08:26:57 +
Suliman via Digitalmars-d-learn
wrote:
> Do you often need debugger when you are writing code?
besides, it's very hard to write code in debugger. even 'ed' is better
for this task. ;-)
signature.asc
Description: PGP signature
On 2014-11-05 6:09 AM, Bauss wrote:
Is there any way to track down access violations, instead of me having
to look through my source code manually.
I have a pretty big source code and an access violation happens at
runtime, but it's going to be a nightmare looking through it all to find
the acce
On Sunday, 9 November 2014 at 09:14:14 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sun, 09 Nov 2014 08:26:57 +
Suliman via Digitalmars-d-learn
wrote:
Do you often need debugger when you are writing code?
almost never.
For which tasks debugger are more needed for you?
inspecting cor
Am 09.11.2014 um 09:26 schrieb Suliman:
I know that a lot of people are using for programming tools like
Sublime. I am one of them. But if for very simple code it's ok, how to
write hard code?
Do you often need debugger when you are writing code? For which tasks
debugger are more needed for you?
On Sun, 09 Nov 2014 08:26:57 +
Suliman via Digitalmars-d-learn
wrote:
> Do you often need debugger when you are writing code?
almost never.
> For which tasks debugger are more needed for you?
inspecting coredumps.
signature.asc
Description: PGP signature
I know that a lot of people are using for programming tools like
Sublime. I am one of them. But if for very simple code it's ok,
how to write hard code?
Do you often need debugger when you are writing code? For which
tasks debugger are more needed for you?
26 matches
Mail list logo