Re: Is there ANY chance we can fix the bitwise operator precedence rules?

2010-06-21 Thread Sean Kelly
Jonathan M Davis Wrote: > > In any case, that means that it could be made required to have a control > statement at the end of a case block without having to specify a specific > destination for fallthrough - though I'd prefer "continue switch" over "goto > case" since it's more explicit and le

Re: enforce()?

2010-06-21 Thread Sean Kelly
Rory McGuire Wrote: > > I think perhaps you mis-understood, it is mostly not stupidity that causes > people to use > undocumented "features" of an API but rather, it is people being overly > "clever". Or sometimes simply desperation. There are some classes of apps that require the use of un

Re: enforce()?

2010-06-21 Thread Adrian Matoga
Leandro Lucarella pisze: Walter Bright, el 20 de junio a las 19:32 me escribiste: Leandro Lucarella wrote: Why will you assume I'm so dumb that I won't use your interface correctly? Windows has had major legacy compatibility issues because critical third party applications misused the APIs. P

Re: enforce()?

2010-06-21 Thread Sean Kelly
Andrei Alexandrescu Wrote: > On 06/20/2010 06:18 PM, Vladimir Panteleev wrote: > > On Mon, 21 Jun 2010 00:17:28 +0300, Walter Bright > > wrote: > > > >> An input to a dll is user input, and should be validated (for the sake > >> of security, and other reasons). Validating it is not debugging. > >

Re: Is there ANY chance we can fix the bitwise operator precedence

2010-06-21 Thread bearophile
KennyTM~: > That is just C#'s switch syntax. Some of the C# designers are people with a long experience in implementing (Pascal-like) programming languages. Convergent evolution is a way to confirm my idea was good, then :-) >And I don't see how the current switch syntax is "hairy".< Even if

Re: DMD Backend Long-term

2010-06-21 Thread Nick Sabalausky
"Eldar Insafutdinov" wrote in message news:hvo49k$1uk...@digitalmars.com... > > In the end, Windows is the most popular > OS despite our personal preferences, and it's worth spending some time for > it. > I wish someone could convince LLVM of that...

Re: Is there ANY chance we can fix the bitwise operator precedence rules?

2010-06-21 Thread Jonathan M Davis
KennyTM~ wrote: > On Jun 19, 10 07:17, Jonathan M Davis wrote: >> bearophile wrote: >> >>> 2) switch cases that don't end with goto or break: >>> >>> void main() { >>> int x, y; >>> switch (x) { >>> case 0: y++; >>> default: y--; >>> } >>> } >> >> I, for one, _want

Re: Using Classes as the KeyType (from the Docs)

2010-06-21 Thread Andrej Mitrovic
Brad Roberts Wrote: > On 6/21/2010 9:18 AM, Andrej Mitrovic wrote: > > Steven Schveighoffer Wrote: > > > >> On Sun, 20 Jun 2010 16:50:04 -0400, Andrej Mitrovic > >> wrote: > >> > >> > >>> Notice I've replaced "foo" with "f" > >>> > >>> Foo is the class, but there's no mention of "foo". I'm gue

Re: Using Classes as the KeyType (from the Docs)

2010-06-21 Thread Brad Roberts
On 6/21/2010 9:18 AM, Andrej Mitrovic wrote: > Steven Schveighoffer Wrote: > >> On Sun, 20 Jun 2010 16:50:04 -0400, Andrej Mitrovic >> wrote: >> >> >>> Notice I've replaced "foo" with "f" >>> >>> Foo is the class, but there's no mention of "foo". I'm guessing it was a >>> typo, unless I'm mis

Re: Using Classes as the KeyType (from the Docs)

2010-06-21 Thread Steven Schveighoffer
On Mon, 21 Jun 2010 12:18:47 -0400, Andrej Mitrovic wrote: Steven Schveighoffer Wrote: On Sun, 20 Jun 2010 16:50:04 -0400, Andrej Mitrovic wrote: > Notice I've replaced "foo" with "f" > > Foo is the class, but there's no mention of "foo". I'm guessing it was a > typo, unless I'm missu

Re: DMD Backend Long-term

2010-06-21 Thread Eldar Insafutdinov
== Quote from dsimcha (dsim...@yahoo.com)'s article > What is the long-term plan for the current DMD backend? I've noticed the > first steps towards 64-bit support were just checked in today (excitement to > the extreme). However, the backend is under such a restrictive license (which > I underst

Re: Using Classes as the KeyType (from the Docs)

2010-06-21 Thread Andrej Mitrovic
Steven Schveighoffer Wrote: > On Sun, 20 Jun 2010 16:50:04 -0400, Andrej Mitrovic > wrote: > > > > Notice I've replaced "foo" with "f" > > > > Foo is the class, but there's no mention of "foo". I'm guessing it was a > > typo, unless I'm missunderstanding something. > > > > Yes, it's a typo

Re: DMD Backend Long-term

2010-06-21 Thread Sean Kelly
dsimcha wrote: > What is the long-term plan for the current DMD backend? I've noticed > the > first steps towards 64-bit support were just checked in today > (excitement to > the extreme). However, the backend is under such a restrictive > license (which > I understand Walter is not free to chan

DMD Backend Long-term

2010-06-21 Thread dsimcha
What is the long-term plan for the current DMD backend? I've noticed the first steps towards 64-bit support were just checked in today (excitement to the extreme). However, the backend is under such a restrictive license (which I understand Walter is not free to change) that it has a "bus factor"

Re: Is there ANY chance we can fix the bitwise operator precedence

2010-06-21 Thread KennyTM~
On Jun 21, 10 17:52, bearophile wrote: Andrei: The intent is to only require a control flow transfer if there is at least one statement after the label.< The current switch syntax is already very hairy (even lot of people on this newsgroup are ignorant about some parts of it!) and it contai

Re: Improving std.regex(p)

2010-06-21 Thread Ellery Newcomer
On 06/21/2010 04:07 AM, Ben Hanson wrote: == Quote from Ellery Newcomer (ellery-newco...@utulsa.edu)'s article On 06/19/2010 03:35 AM, Ben Hanson wrote: I can't prove what the comlexity is for DFA compilation, but instead, I challenge anyone to show slow compilation times with any DFA compatibl

Re: Improving std.regex(p)

2010-06-21 Thread Ellery Newcomer
On 06/19/2010 11:27 PM, Ellery Newcomer wrote: On 06/19/2010 10:55 PM, BCS wrote: Hello Nick, "BCS" wrote in message news:a6268ff154ca8ccddf1ef51e...@news.digitalmars.com... Hello Ellery, Generally I think D's CT capabilities have a way to go yet before this would be worth tackling. E.g.

Re: enforce()?

2010-06-21 Thread Leandro Lucarella
Andrei Alexandrescu, el 21 de junio a las 08:02 me escribiste: > On 06/20/2010 11:08 PM, Leandro Lucarella wrote: > >Walter Bright, el 20 de junio a las 19:32 me escribiste: > >>Leandro Lucarella wrote: > >>>Why will you assume I'm so dumb that I won't use your > >>>interface correctly? > >> > >>Wi

Re: enforce()?

2010-06-21 Thread Rory McGuire
On Mon, 21 Jun 2010 06:08:01 +0200, Leandro Lucarella wrote: Walter Bright, el 20 de junio a las 19:32 me escribiste: Leandro Lucarella wrote: >Why will you assume I'm so dumb that I won't use your >interface correctly? Windows has had major legacy compatibility issues because critical thir

Re: How to erase chars from char[]?

2010-06-21 Thread Andrei Alexandrescu
On 06/21/2010 06:43 AM, Ben Hanson wrote: I've changed the code to use CharT[] again, which simplified things substantially. However, I can't find a way to erase characters from a char[]. Can anyone help? http://www.digitalmars.com/d/2.0/phobos/std_array.html#replace Andrei

Re: main.d(61): Error: temp_[i_] isn't mutable

2010-06-21 Thread Andrei Alexandrescu
On 06/21/2010 03:37 AM, Ben Hanson wrote: I'm currently using strings for the regex strings themselves. In lexertl, I use templated free functions what work with iterators, which means input can come from different sources. This sounds like the kind of thing you are talking about? Regards, Ben

Re: enforce()?

2010-06-21 Thread Andrei Alexandrescu
On 06/20/2010 11:08 PM, Leandro Lucarella wrote: Walter Bright, el 20 de junio a las 19:32 me escribiste: Leandro Lucarella wrote: Why will you assume I'm so dumb that I won't use your interface correctly? Windows has had major legacy compatibility issues because critical third party applicat

Stack info

2010-06-21 Thread bearophile
Is is possible to add to Phobos standard functions (intrinsics, if necessary) that give some information about the C stack? Things like: - Available space left on the stack (for a thread) - Total size of the stack at program start - The direction of stack growth (see for example http://www.devx.

Re: How to erase chars from char[]?

2010-06-21 Thread bearophile
Ben Hanson: > However, I can't find a way to erase characters from a char[]. > Can anyone help? If you need to delete the last chars you can just decrease the length. If you need to delete chars in the middle you can copy items with memmove() and then decrease the length. You can also write a fu

How to erase chars from char[]?

2010-06-21 Thread Ben Hanson
I've changed the code to use CharT[] again, which simplified things substantially. However, I can't find a way to erase characters from a char[]. Can anyone help? See the current code below. Thanks, Ben module main; import std.algorithm; import std.string; template regex(CharT) { struct basic

Re: Using Classes as the KeyType (from the Docs)

2010-06-21 Thread Steven Schveighoffer
On Sun, 20 Jun 2010 16:50:04 -0400, Andrej Mitrovic wrote: Notice I've replaced "foo" with "f" Foo is the class, but there's no mention of "foo". I'm guessing it was a typo, unless I'm missunderstanding something. Yes, it's a typo. You should file a bug. -Steve

Re: Is there ANY chance we can fix the bitwise operator precedence

2010-06-21 Thread Don
bearophile wrote: Andrei: The intent is to only require a control flow transfer if there is at least one statement after the label.< The current switch syntax is already very hairy (even lot of people on this newsgroup are ignorant about some parts of it!) and it contains one or more speci

Re: Is there ANY chance we can fix the bitwise operator precedence

2010-06-21 Thread bearophile
Andrei: >The intent is to only require a control flow transfer if there is at least one >statement after the label.< The current switch syntax is already very hairy (even lot of people on this newsgroup are ignorant about some parts of it!) and it contains one or more special cases. So I sugge

Re: Improving std.regex(p)

2010-06-21 Thread Ben Hanson
== Quote from Ellery Newcomer (ellery-newco...@utulsa.edu)'s article > On 06/19/2010 03:35 AM, Ben Hanson wrote: > > I can't prove what the comlexity is for DFA compilation, but instead, I > > challenge anyone to show slow compilation times with any DFA compatible > > regex. > > As I don't have so

Re: main.d(61): Error: temp_[i_] isn't mutable

2010-06-21 Thread Ben Hanson
Hi Andrei, == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > On 06/20/2010 12:56 PM, Ali Çehreli wrote: > > Ben Hanson wrote: > >> == Quote from Justin Spahr-Summers (justin.spahrsumm...@gmail.com)'s > >>> "string" is actually an alias for "immutable(char)[]" (and > >>

Re: A web server with D

2010-06-21 Thread Rory McGuire
On Sun, 20 Jun 2010 13:54:26 +0200, Mengu wrote: Hi, I have been interested in and learning D for a while and currently developing a web development IDE with it. I can say that I have a middle level knowledge that I have been trying to increase. Anyway. I want to develop a web server fo

Re: Where will D be in 2015 in the programming language ecosphere?

2010-06-21 Thread Rory McGuire
On Sat, 19 Jun 2010 15:04:21 +0200, Justin Johansson wrote: Me thinks this both a polite question and a question due of realistic answers. How doth thou respond? Not sure, but what I do think is: If D ran on ARM it would be a favorite for mobile devices, often programs are just too slo

<    1   2