View previous topic :: View next topic |
Author |
Message |
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Sun Jul 11, 2004 7:03 pm Post subject: |
|
|
Yeah... it's annoying, but it's not mango that's the problem here. Obviously dmd has some serious issues to be fixed still. That's a pretty big bug, and potentially very elusive. The frustrating part is having to second guess yourself during the bug hunting only to see the problem lies with the compiler. It's amazing you've got this far.... |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Sun Jul 11, 2004 7:07 pm Post subject: |
|
|
It's crud like this that shows the true benefit of using libraries instead of reinventing a SocketListener type of thing over and over. Imagine all this wasted effort multiplied by many, many people?
Since you found this codegen bug, do you wanna' write it up for the NG buglist? |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Sun Jul 11, 2004 7:16 pm Post subject: |
|
|
*Sigh* Yeah... I can do that. We'll see if anyone listens this time.
But first, just to clarify, what is the break breaking out of? Perhaps it's seeing the try{} or catch{} scope as the break point instead of the whole while loop? I guess if that is the case, it effectively acts like no break at all (especially in the try portion) since that would still cause a continuation of the while loop. |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Sun Jul 11, 2004 7:37 pm Post subject: |
|
|
JJR wrote: | *Sigh* Yeah... I can do that. We'll see if anyone listens this time.
But first, just to clarify, what is the break breaking out of? Perhaps it's seeing the try{} or catch{} scope as the break point instead of the whole while loop? I guess if that is the case, it effectively acts like no break at all (especially in the try portion) since that would still cause a continuation of the while loop. |
The D documentation for break is explicit about it breaking out of the innermost loop. While there are notes regarding finally, there is no mention anywhere of try/catch, and nor should there be. If you'd rather no write it up, then don't sweat it ~ you've done enough good for one day
BTW, break does exit the catch{} block correctly; but not the try{} block as it should. |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Sun Jul 11, 2004 7:45 pm Post subject: |
|
|
kris wrote: | The D documentation for break is explicit about it breaking out of the innermost loop. While there are notes regarding finally, there is no mention anywhere of try/catch, and nor should there be. If you'd rather no write it up, then don't sweat it ~ you've done enough good for one day |
Yeah... I perused the docs and found that too. Obviously a bug then. I was just wondering if the exception scope break was what was actually happening. I guess how and why isn't really the issue, since break obviously is not following the language definition. I guess it could be temporarily fixed with a break <identifier> (although return accomplishes the same thing ATM); so whatever.
No problem... I'll submit the error report. Hopefully Walter will take notice... |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Sun Jul 11, 2004 7:55 pm Post subject: |
|
|
Ah, I edited my post just before you sent yours; a small clarification on scope is noted above. The version of SocketListener I'm using has an additional counter to limit the number of exceptions processed, so as to avoid an infinite exception loop. I just set the number of remaining lives such that the loop terminates.
Regarding named break-targets ~ I try to avoid them at all costs, both for performance and maintainability issues. Yes there are certain types of problems that can be made more understandable via the use of goto and so on, but even those can often be restated more eloquently without. Haven't found it necessary to use said constructs since writing Basic 21+ years ago, and I've written an embarrassing quantity of code since then
edit: it's also rather embarrassing when you misspell eloquent ...
Last edited by kris on Sun Jul 11, 2004 10:42 pm; edited 1 time in total |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Sun Jul 11, 2004 8:11 pm Post subject: |
|
|
kris wrote: | Ah, I edited my post just before you sent yours; a small clarification on scope is noted above. The version of SocketListener I'm using has an additional counter to limit the number of exceptions processed, so as to avoid an infinite exception loop. I just set the number of remaining lives such that the loop terminates. |
Ahh... that works too.
kris wrote: | Regarding named break-targets ~ I try to avoid them at all costs, both for performance and maintainability issues. Yes there are certain types of problems that can be made more understandable via the use of goto and so on, but even those can often be restatedmore elequently without. Haven't found it necessary to use said constructs since writing Basic 21+ years ago, and I've written rather a lot of code in that time |
Yeah... I know goto's/labeled breaks are bad, bad, bad. I was just thinking of a temporary hacky solution. Sometime's it's hard to code with elegance with a buggy compiler (but the return's obviously do a cleaner job anyway). Your code is the epitome of elegance, so I can see why it would be a particular anathema for you. I started with BASIC about 14 or 15 years ago and made much use of the goto during that time. It was only when I was introduced to C several years later that the evil's of the goto were revealed to me. |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Sun Jul 11, 2004 8:26 pm Post subject: |
|
|
Right; the whole thing is excruciatingly academic anyway. Better just to write useful stuff that works.
On a different topic, I can't help but notice that the vast majority of posts occur when a problem arises. It's sometimes discouraging when there's not much in the way of post activity on a project, but I guess it could mean that there's not much in the way of problems rather than perhaps nobody taking an interest
I hope other projects don't get discouraged due to a perception of low post activity. I think this little thread/topic has proved what it takes to generate traffic: inadvertantly introduce a nasty bug! That's human nature for you (from both sides!) |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Sun Jul 11, 2004 11:43 pm Post subject: |
|
|
kris wrote: | Right; the whole thing is excruciatingly academic anyway. Better just to write useful stuff that works. |
Yep...
kris wrote: | On a different topic, I can't help but notice that the vast majority of posts occur when a problem arises. It's sometimes discouraging when there's not much in the way of post activity on a project, but I guess it could mean that there's not much in the way of problems rather than perhaps nobody taking an interest |
I'm afraid that it might be more the latter than the former. You're right, though; dsource.org appears to have minimal feedback considering the number of serious projects it contains. Maybe it just needs some time. Dsource.org, at least, looks like it will be going along for the D language ride. The popularity of D will likely influence this site's success, good or bad.
kris wrote: | I hope other projects don't get discouraged due to a perception of low post activity. I think this little thread/topic has proved what it takes to generate traffic: inadvertantly introduce a nasty bug! That's human nature for you (from both sides!) |
Nothing like a bug to cause the chatter to flow . Come to think of it, our earlier exchanges might have been more beneficial if they were posted here (or perhaps they might have bored people to death).
Mango forums are currently the busiest on this site. And it's not just about bugs... So that's at least something.
Maybe we need to do more friendly chatting about general D stuff to get more community involvement. I dont' know...
Have a good one,
John |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|