FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mango Beta 9
Goto page Previous  1, 2, 3, 4, 5
 
Post new topic   Reply to topic     Forum Index -> Mango
View previous topic :: View next topic  
Author Message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Jul 11, 2004 7:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sun Jul 11, 2004 7:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Jul 11, 2004 7:16 pm    Post subject: Reply with quote

*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
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sun Jul 11, 2004 7:37 pm    Post subject: Reply with quote

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 Cool

BTW, break does exit the catch{} block correctly; but not the try{} block as it should.
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Jul 11, 2004 7:45 pm    Post subject: Reply with quote

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 Cool


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
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sun Jul 11, 2004 7:55 pm    Post subject: Reply with quote

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 Embarassed

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
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Jul 11, 2004 8:11 pm    Post subject: Reply with quote

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. Smile

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 Embarassed


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
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sun Jul 11, 2004 8:26 pm    Post subject: Reply with quote

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 Crying or Very sad

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
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Jul 11, 2004 11:43 pm    Post subject: Reply with quote

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 Crying or Very sad


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 Razz. 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... Smile

Have a good one,

John
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mango All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4, 5
Page 5 of 5

 
Jump to:  
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