aarti_pl wrote:
Don pisze:
Additionally in my framework you can pass around parts of SQL e.g. :
WhereExpression exp = Where(More(visitcards.id, 100));
You basically *CAN NOT* do it when just using strings.
Of course you can define a where clause using strings.
(I'm not sure when you'd
Don wrote:
aarti_pl wrote:
Don pisze:
Additionally in my framework you can pass around parts of SQL e.g. :
WhereExpression exp = Where(More(visitcards.id, 100));
You basically *CAN NOT* do it when just using strings.
Of course you can define a where clause using strings.
Even today,
On Wed, 25 Nov 2009 00:46:39 +0300, Travis Boucher
boucher.tra...@gmail.com wrote:
Denis Koroskin wrote:
On Tue, 24 Nov 2009 14:00:18 +0300, Gerrit Wichert g...@green-stores.de
wrote:
how about opLimit ?
I recall that Visual Basic has UBound function that returns upper
bound of a
On Wed, 25 Nov 2009 03:03:59 +0300, bearophile bearophileh...@lycos.com
wrote:
Found on Reddit:
This looks a lot like D:
http://research.swtch.com/2009/11/go-data-structures.html
New features in Java, some of them look like D:
http://code.joejag.com/2009/new-language-features-in-java-7/
Denis Koroskin wrote:
On Wed, 25 Nov 2009 03:03:59 +0300, bearophile
bearophileh...@lycos.com wrote:
Found on Reddit:
This looks a lot like D:
http://research.swtch.com/2009/11/go-data-structures.html
New features in Java, some of them look like D:
Bill Baxter wrote:
version(int) is like a programming language with one variable. It's
ridiculous.
One variable, and one operator, =.
To be fair, it was clearly intended to refer to the version of the
final user's app, not a library version or platform version or
anything else.
But to assume
bearophile bearophileh...@lycos.com wrote in message
news:heibbs$1q2...@digitalmars.com...
One of the most important ones is to be able to see the number and names
of the unit tests that have failed.
Shameless plug:
bearophile bearophileh...@lycos.com wrote in message
news:heiaea$1oc...@digitalmars.com...
Jason House:
IMHO, enum is a patchwork collection of features... manifest constants,
enumerated lists, and bitmasks are all conflated into something rather
ugly.
Manifest constants defined with
BCS n...@anon.com wrote in message
news:a6268ffd62c8cc3b5a3ae2d...@news.digitalmars.com...
Hello KennyTM~,
What's the point of using bases other than 2, 8, 10, 16, 36 and 64?
Base 13 is useful in literature.
Also, base 4 is very useful on Parallax's Propeller microcontroller because
it's
Nick Sabalausky:
rename
the current const to readonly (since that's what it *really* is anyway,
the current const is nearly as poorly-named as the current enum), and
then change enum to const.
I like something like that. There's another couple of proposals. Let's see if
Walter is willing
Bartosz Milewski Wrote:
Steven Schveighoffer Wrote:
Bottom line: if a function isn't supposed to change the buffer, the
signature should be const for that parameter. It's one of the principles
of const, and why it's in D2 in the first place. I'd explain to the coder
that he
Walter Bright wrote:
Bill Baxter wrote:
version(int) is like a programming language with one variable. It's
ridiculous.
One variable, and one operator, =.
To be fair, it was clearly intended to refer to the version of the
final user's app, not a library version or platform version or
Steven Schveighoffer schvei...@yahoo.com wrote:
You are again resorting to implementation. I guess in the current
implementation it's true that the compiler will indeed insert a call to
its internal function. But the language spec does not proscribe that.
Sure it does. It says that
On Wed, 25 Nov 2009 11:42:53 +0300, Don nos...@nospam.com wrote:
Don wrote:
aarti_pl wrote:
Don pisze:
Additionally in my framework you can pass around parts of SQL e.g. :
WhereExpression exp = Where(More(visitcards.id, 100));
You basically *CAN NOT* do it when just using strings.
Of
Denis Koroskin wrote:
On Wed, 25 Nov 2009 11:42:53 +0300, Don nos...@nospam.com wrote:
Don wrote:
aarti_pl wrote:
Don pisze:
Additionally in my framework you can pass around parts of SQL e.g. :
WhereExpression exp = Where(More(visitcards.id, 100));
You basically *CAN NOT* do it when just
Don wrote:
Walter Bright wrote:
Bill Baxter wrote:
version(int) is like a programming language with one variable. It's
ridiculous.
One variable, and one operator, =.
To be fair, it was clearly intended to refer to the version of the
final user's app, not a library version or platform
bearophile bearophileh...@lycos.com wrote in message
news:hej7tb$k2...@digitalmars.com...
Nick Sabalausky:
Another good idea is like yigal said, just improve the optimizer so that
any
immutables whose value is known at compile-time ends up effectively being
treated as a manifest constant.
Nick Sabalausky:
then attempting to evaluate
blahExpression at compile-time (which I believe it already does) and if it
succeeds, then treat it as a manifest constant in any place where it's used
(except for the places where it's pointer or reference is taken).
I think this is not so easy
(This comes from things that Lindquist has vaguely said, but I am not sure).
I am very ignorant about this topic still, so I can be quite wrong, but I think
it can be positive to split the D2 front-end in two layers, to simplify the
creation of D compilers:
1) A true front-end layer that's
Simen kjaeraas Wrote:
Steven Schveighoffer schvei...@yahoo.com wrote:
You are again resorting to implementation. I guess in the current
implementation it's true that the compiler will indeed insert a call to
its internal function. But the language spec does not proscribe that.
bearophile, el 25 de noviembre a las 07:28 me escribiste:
Another good idea is like yigal said, just improve the optimizer so that
any
immutables whose value is known at compile-time ends up effectively being
treated as a manifest constant. Then rip out enum's enum x = 7; syntax
and
Wed, 25 Nov 2009 09:29:10 -0500, bearophile wrote:
Nick Sabalausky:
then attempting to evaluate
blahExpression at compile-time (which I believe it already does) and if
it succeeds, then treat it as a manifest constant in any place where
it's used (except for the places where it's pointer
Denis Koroskin wrote:
I recall that Visual Basic has UBound function that returns upper
bound of a multi-dimensional array:
Dim a(100, 5, 4) As Byte
UBound(a, 1) - 100
UBound(a, 2) - 5
UBound(a, 3) - 4
Works for single-dimensional arrays, too:
Dim b(8) As Byte
UBound(b) - 8
I brought a
On 11/25/2009 10:46 AM, Don wrote:
Denis Koroskin wrote:
I recall that Visual Basic has UBound function that returns upper
bound of a multi-dimensional array:
Dim a(100, 5, 4) As Byte
UBound(a, 1) - 100
UBound(a, 2) - 5
UBound(a, 3) - 4
Works for single-dimensional arrays, too:
Dim b(8) As Byte
On Wed, 25 Nov 2009 21:11:48 +0300, Ellery Newcomer
ellery-newco...@utulsa.edu wrote:
On 11/25/2009 10:46 AM, Don wrote:
Denis Koroskin wrote:
I recall that Visual Basic has UBound function that returns upper
bound of a multi-dimensional array:
Dim a(100, 5, 4) As Byte
UBound(a, 1) - 100
On Wed, 25 Nov 2009 21:11:48 +0300, Ellery Newcomer
ellery-newco...@utulsa.edu wrote:
On 11/25/2009 10:46 AM, Don wrote:
Denis Koroskin wrote:
I recall that Visual Basic has UBound function that returns upper
bound of a multi-dimensional array:
Dim a(100, 5, 4) As Byte
UBound(a, 1) - 100
Quick one: could the compiler enforce that enum values in order of appearance
are sorted?
It could neatly guarantee no surprises with case ranges, like this one:
enum Weird { One=1, Two=4, Three=3 }
Now, case Weird.One: .. case Weird.Three: won't match Weird.Two.
I'd agree that you don't see
Denis Koroskin wrote:
On Wed, 25 Nov 2009 21:11:48 +0300, Ellery Newcomer
ellery-newco...@utulsa.edu wrote:
On 11/25/2009 10:46 AM, Don wrote:
Denis Koroskin wrote:
I recall that Visual Basic has UBound function that returns upper
bound of a multi-dimensional array:
Dim a(100, 5, 4) As Byte
== Quote from Tomek_Sowi�ski (j...@ask.me)'s article
Quick one: could the compiler enforce that enum values in order of appearance
are sorted?
It could neatly guarantee no surprises with case ranges, like this one:
enum Weird { One=1, Two=4, Three=3 }
Now, case Weird.One: .. case Weird.Three:
Don wrote:
bearophile wrote:
Don:
There seems to be no point in having a *single* integer value, shared
between the app and all libraries! It's just reducing future
flexibility.
It doesn't reduce flexibility at all,
I meant future D flexibility.
because if you need something more
(This would probably fit better on bugzilla, but for whatever reason I
cannot access it at the moment. Please feel free to move this to the tracker
and CC me if it is really a bug.)
As you might remember from #d and d.D.learn, I want to check if a given
member function has been overridden (at
Steven Schveighoffer Wrote:
As long as the spec says changing length may expand the array to hold enough
space, the optimizer can't, because the optimization would change the side
effects of the function. An optimizer should not change the outcome or side
effects of a function. It's not
Tomek Sowiñski j...@ask.me wrote in message
news:hek1nv$2d6...@digitalmars.com...
Quick one: could the compiler enforce that enum values in order of
appearance are sorted?
It could neatly guarantee no surprises with case ranges, like this one:
enum Weird { One=1, Two=4, Three=3 }
Now,
Bartosz Milewski wrote:
Steven Schveighoffer Wrote:
As long as the spec says changing length may expand the array to hold enough
space, the optimizer can't, because the optimization would change the side
effects of the function. An optimizer should not change the outcome or side
effects of
Steven Schveighoffer Wrote:
Bartosz Milewski Wrote:
Steven Schveighoffer Wrote:
Bottom line: if a function isn't supposed to change the buffer, the
signature should be const for that parameter. It's one of the principles
of const, and why it's in D2 in the first
dsimcha Wrote:
Have you ever seen this issue come up in practice in a real program? I'd be
hesitant to add even a small amount of complexity and restrictions to a
language
to prevent some class of bugs that's only a theoretical possibility and almost
never occurs in real-world code.
It's
On 11/25/2009 01:40 PM, Denis Koroskin wrote:
IIRC lower bound is 1 by default in VB and therefore b(0) is illegal.
Nope.
Dim b(8) as String
is equivalent to
Dim b(0 to 8) as String
and therefore b(0) is very legal.
On Sun, 22 Nov 2009 20:34:21 +0100, dsimcha dsim...@yahoo.com wrote:
One issue that should ideally be resolved before D2 is finalized that I
meant
to bring up here a long time ago is how to handle pure and nothrow in
generic
functions. For example:
T max(T)(T lhs, T rhs) {
return (lhs
Andrei Alexandrescu Wrote:
Bartosz Milewski wrote:
Steven Schveighoffer Wrote:
As long as the spec says changing length may expand the array to hold
enough space, the optimizer can't, because the optimization would change
the side effects of the function. An optimizer should not
Bartosz Milewski wrote:
Andrei Alexandrescu Wrote:
Bartosz Milewski wrote:
Steven Schveighoffer Wrote:
As long as the spec says changing length may expand the array
to hold enough space, the optimizer can't, because the
optimization would change the side effects of the function. An
bearophile wrote:
(This comes from things that Lindquist has vaguely said, but I am not sure).
I am very ignorant about this topic still, so I can be quite wrong, but I think
it can be positive to split the D2 front-end in two layers, to simplify the
creation of D compilers:
1) A true
Andrei Alexandrescu Wrote:
How about creating a struct Value!T that transforms T (be it an array or
a class) into a value type? Then if you use Value!(int[]), you're
effectively dealing with values throughout (even though internally they
might be COWed). Sometimes I also see a need for
dsimcha wrote:
One issue that should ideally be resolved before D2 is finalized that I meant
to bring up here a long time ago is how to handle pure and nothrow in generic
functions. For example:
T max(T)(T lhs, T rhs) {
return (lhs rhs) ? lhs : rhs;
}
Obviously, if T is an int, max can
Bartosz Milewski Wrote:
Steven Schveighoffer Wrote:
As long as the spec says changing length may expand the array to hold
enough space, the optimizer can't, because the optimization would change
the side effects of the function. An optimizer should not change the
outcome or side
Bartosz Milewski Wrote:
The problem here is that the guy is sort of right. Indeed quote() expands the
slice before overwriting it and that requires re-allocation to avoid stomping
over the original buffer. There is however a boundary case, when the whole
buffer matches the pattern. Then
Bartosz Milewski wrote:
Andrei Alexandrescu Wrote:
How about creating a struct Value!T that transforms T (be it an
array or a class) into a value type? Then if you use Value!(int[]),
you're effectively dealing with values throughout (even though
internally they might be COWed). Sometimes I
bearophile wrote:
Bill Baxter:
The good thing is that since most of the machinery is there, the
actual compiler changes required would mostly be just rewrites of new
syntax in terms of existing functionality.
I agree, this looks like something that can be added to D even after D2 comes
out
Don wrote:
bearophile wrote:
Bill Baxter:
The good thing is that since most of the machinery is there, the
actual compiler changes required would mostly be just rewrites of new
syntax in terms of existing functionality.
I agree, this looks like something that can be added to D even after
Saaa em...@needmail.com wrote:
struct S : Pos {}
Why is this not possible?
Why do you want to use a struct for that, rather than a class?
miriac 1234...@gmail.com wrote:
Jesse Phillips Wrote:
miriac Wrote:
I'm trying to get my program to read all the files in a directory.
dmd gives an errer that theis imports dont exist:
tango.io.FileSystem,
tango.io.FileRoots,
Can someone please help me and tell me what i use to
Don:
That's been requested many times. I posted a patch to Walter to do
exactly that. It was beautiful. It detected recursive template
expansions, and gave really nice error messages. Silently rejected.
Sigh.
If your patch is well done, works with LDC too, I see no reason to refuse this
Lars T. Kyllingstad:
What's the bugzilla number? Should be upvoted.
I think he refers to this one (searching something in Bugzilla seems a good way
to spend a morning):
http://d.puremagic.com/issues/show_bug.cgi?id=2816
In the comment 9, instead of:
bug.d(2): Error: static assert (0) is
bearophile wrote:
Don:
That's been requested many times. I posted a patch to Walter to do
exactly that. It was beautiful. It detected recursive template
expansions, and gave really nice error messages. Silently rejected.
Sigh.
If your patch is well done, works with LDC too, I see no reason
Don:
Please don't do that just yet. It's something that can wait until the D2
stuff is finished. It can be added at any time. Some of the other things
are urgent.
OK :-) You are right, as usual.
Bye,
bearophile
http://d.puremagic.com/issues/show_bug.cgi?id=3549
Matti Niemenmaa matti.niemenmaa+dbugzi...@iki.fi changed:
What|Removed |Added
Status|NEW
http://d.puremagic.com/issues/show_bug.cgi?id=602
Matti Niemenmaa matti.niemenmaa+dbugzi...@iki.fi changed:
What|Removed |Added
CC|
d-bugm...@puremagic.com wrote:
http://d.puremagic.com/issues/show_bug.cgi?id=3549
Don clugd...@yahoo.com.au changed:
What|Removed |Added
CC|
Rory McGuire wrote:
d-bugm...@puremagic.com wrote:
http://d.puremagic.com/issues/show_bug.cgi?id=3549
Don clugd...@yahoo.com.au changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=3551
Summary: nested struct = dmd adds a hidden pointer
Product: D
Version: 2.036
Platform: Other
OS/Version: All
Status: NEW
Keywords: wrong-code
Severity: regression
http://d.puremagic.com/issues/show_bug.cgi?id=3551
Don clugd...@yahoo.com.au changed:
What|Removed |Added
CC||clugd...@yahoo.com.au
---
http://d.puremagic.com/issues/show_bug.cgi?id=1439
Don clugd...@yahoo.com.au changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=3544
Don clugd...@yahoo.com.au changed:
What|Removed |Added
Summary|optlink unexpected |optlink termination
http://d.puremagic.com/issues/show_bug.cgi?id=3544
--- Comment #9 from Don clugd...@yahoo.com.au 2009-11-25 05:29:15 PST ---
Even smaller test case. Seems it happens with a depth around 512; it's probably
exceeding the maximum symbol length.
---
char[] foo(int n) {
return void abcde() { ~ (
http://d.puremagic.com/issues/show_bug.cgi?id=3523
--- Comment #5 from Witold Baryluk bary...@smp.if.uj.edu.pl 2009-11-25
06:11:41 PST ---
Ok, i now i solved it using kind of hack:
/** This class is written because Fiber's are not correctly garbage collected
*/
class GenWrap(T : AGenerator,
http://d.puremagic.com/issues/show_bug.cgi?id=3552
Summary: Compile time assertion error with associative arrays
of class types
Product: D
Version: 2.036
Platform: x86_64
OS/Version: Windows
Status: NEW
http://d.puremagic.com/issues/show_bug.cgi?id=3552
Don clugd...@yahoo.com.au changed:
What|Removed |Added
Keywords||ice-on-valid-code
http://d.puremagic.com/issues/show_bug.cgi?id=3552
--- Comment #1 from Justin Greenwood justin.greenw...@gmail.com 2009-11-25
07:36:28 PST ---
Created an attachment (id=519)
The simple example that doesn't fail because I removed the use of the variant
module.
--
Configure issuemail:
http://d.puremagic.com/issues/show_bug.cgi?id=3552
Don clugd...@yahoo.com.au changed:
What|Removed |Added
Summary|ICE(mtype.c): associative |ICE(mtype.c): declaring a
http://d.puremagic.com/issues/show_bug.cgi?id=3552
--- Comment #3 from Justin Greenwood justin.greenw...@gmail.com 2009-11-25
19:24:56 PST ---
FYI - For anyone that needs to work around this temporarily, just copy the
std.variant module to a different module location. Change the module
http://d.puremagic.com/issues/show_bug.cgi?id=2029
--- Comment #8 from Don clugd...@yahoo.com.au 2009-11-25 21:23:48 PST ---
Thanks, this is helpful. The problem is, that this isn't an isolated bug: the
struct constructor bug has the same root cause. I think we need to fix both of
them at once.
70 matches
Mail list logo