mIRC Home    About    Download    Register    News    Help

Page 2 of 2 < 1 2
Topic Options
#178125 - 05/06/07 03:16 PM Re: Script parsing bug? [Re: NaquadaServ]
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
So because mIRC supports some bad habits you think it should support more?

It may be awkward to remove the current allowances due to backwards compatability, but that's absolutely no reason to encourage more poor code by making mIRC play parser-detective.

You seem to have some kind of pathological phobia of errors. There's nothing wrong with them. They're downright vital in fact. When code's meaning isn't clear - that's an error. Trying to sweep them under the carpet with guesswork doesn't help anybody.
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top
#178132 - 05/06/07 06:20 PM Re: Script parsing bug? [Re: NaquadaServ]
hixxy Offline
Hoopy frood

Registered: 06/09/05
Posts: 2876
Originally Posted By: NaquadaServ
To all three prior replies: I'm sorry, I'm not going to teach a course in logic here.


Good. You're not qualified.

Top
#178137 - 05/06/07 07:37 PM Re: Script parsing bug? [Re: NaquadaServ]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: NC, USA
starbucks_mafia is right. Bad coding practices shouldn't be encouraged even if some bad practices are already possible in mIRC. Write code using proper syntax and you'll save everyone a lot of headaches. I absolutely hate trying to debug code that is written using invalid syntax or written in such a way as to make it difficult to read clearly (such as tons of commands on a single line using pipes). It's just not helpful to anyone.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#178146 - 05/06/07 09:16 PM Re: Script parsing bug? [Re: Riamus2]
NaquadaServ Offline
Fjord artisan

Registered: 12/12/02
Posts: 580
Proper syntax is flawed, all I'm saying is make it consistent. Eliminate the sometimes is does, sometimes it doesn't situations.

Thankfully the decision is not up to all of you, it Khaled's decision. I assume (unlike I can for the rest of you) that he actually has a computer science degree, and can fully understand my argument.



Edited by NaquadaServ (05/06/07 09:19 PM)
_________________________
NaquadaBomb
www.mirc-dll.com

Top
#178148 - 05/06/07 09:20 PM Re: Script parsing bug? [Re: NaquadaServ]
RoCk Offline
Hoopy frood

Registered: 16/12/02
Posts: 2007
I can understand that it should be consistent, but if anything were to be changed, it should go the opposite way from where you want it to go.

~ Edit ~

lmao .. so now everyone else is stupid and uneducated because they don't see things your way?


Edited by RoCk (05/06/07 09:23 PM)

Top
#178161 - 05/06/07 10:08 PM Re: Script parsing bug? [Re: RoCk]
NaquadaServ Offline
Fjord artisan

Registered: 12/12/02
Posts: 580
Originally Posted By: RoCk
I can understand that it should be consistent, but if anything were to be changed, it should go the opposite way from where you want it to go.

I agree, but do you honestly think that (killing backwards compatibility) would go over well here? I'm arguing the only backwards compatible method to resolve these inconsistencies.

Originally Posted By: RoCk
lmao .. so now everyone else is stupid and uneducated because they don't see things your way?


No, not stupid, far from it, just less skilled/experienced. I didn't say everyone, only commenting on those people that responded earlier to this thread. It's also an assumption, nothing more.


Edited by NaquadaServ (05/06/07 10:17 PM)
_________________________
NaquadaBomb
www.mirc-dll.com

Top
#178163 - 05/06/07 10:16 PM Re: Script parsing bug? [Re: NaquadaServ]
hixxy Offline
Hoopy frood

Registered: 06/09/05
Posts: 2876
It's a minor inconsistency that has gone almost unnoticed for years because nobody wants to write such tacky code. Fixing this inconsistency will not really benefit the users of the program, but it will make code harder to debug for people unaware of the correct syntax. It may be an inconsistency, but it's a useful one.

Top
#178166 - 05/06/07 10:20 PM Re: Script parsing bug? [Re: NaquadaServ]
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
Quote:

I agree, but do you honestly think that (killing backwards compatibility) would go over well here? I'm arguing the only backwards compatible method to resolve these inconsistencies.

The fundamental flaw in your logic here is that most people would rather see less scope for poor code at the cost of letting the inconsistency remain. Personally I'd be quite happy to see backwards compatability broken in this case to enforce the use of () or {}.

But that's probably just my lack of skill and experience talking.
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top
#178167 - 05/06/07 10:30 PM Re: Script parsing bug? [Re: starbucks_mafia]
NaquadaServ Offline
Fjord artisan

Registered: 12/12/02
Posts: 580
Originally Posted By: starbucks_mafia
Personally I'd be quite happy to see backwards compatability broken in this case to enforce the use of () or {}.

At least I partially got through to someone.

Originally Posted By: starbucks_mafia
But that's probably just my lack of skill and experience talking.

Love the sarcasm... smile
_________________________
NaquadaBomb
www.mirc-dll.com

Top
#178193 - 06/06/07 04:30 AM Re: Script parsing bug? [Re: NaquadaServ]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: NC, USA
Considering that I do have a degree and have a very good understanding of computers and programming and have even taught both, I think your assumption is invalid. And I'm sure the same can be said for most others here as well (especially those who are regular helpers).

Now. Consistancy is a good thing. However, as has been mentioned, you should *not* make it consistant by allowing more bad coding styles. That is a bad argument, pure and simple. Forcing only valid syntax (ie. good coding styles) is not a bad thing.

So the question comes up... should we break all of the scripts that use bad coding that currently work because mIRC lets some things slip by so that coding is consistant -- you either use valid code or it won't work, or do we leave things as they are so that no scripts are broken, but coding styles cannot deteriorate further than they already are.

That's a difficult question because you don't want to break as many scripts as those changes would break. However, mIRC has made changes that forced better coding (6.20 did that) and it did break some scripts that weren't coded correctly. Of course, those changes were to actual errors rather than dropping sets of ()'s and {}'s, so forcing people to fix those was more valid than forcing them to add in all of the missing ()'s and {}'s. Even so, it is a precedent to forcing valid code. The question remains as to wheter Khaled will do that. Personally, I think valid syntax should always be required. It makes debugging a LOT easier and it also makes for less chance of producing errors.

In any case, I think everyone here (and most likely Khaled as well) will agree that mIRC should *not* allow *more* bad coding, no matter what. The real question is whether or not to force good coding for the items that can currently be coded "badly" and still work. You'd have support for that suggestion, but you won't have support for lowering the coding syntax requirements.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#178196 - 06/06/07 08:04 AM Re: Script parsing bug? [Re: Riamus2]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
RusselB nominates Riamus for President laugh You've got my vote

Top
#178197 - 06/06/07 09:10 AM Re: Script parsing bug? [Re: Riamus2]
hixxy Offline
Hoopy frood

Registered: 06/09/05
Posts: 2876
I say leave it as it is. Using only one set of brackets isn't even what I'd call 'bad' coding, as it's still very clear what you're trying to do.

Code:
if x == y { do this }
if (x == y) do this
if (x == y) { do this }


There's absolutely no ambiguity in any of those statements. In this however:

Code:
if x == y do this


There is.

Top
#178199 - 06/06/07 09:54 AM Re: Script parsing bug? [Re: NaquadaServ]
Om3n Offline
Fjord artisan

Registered: 06/07/03
Posts: 655
Originally Posted By: NaquadaServ
Originally Posted By: starbucks_mafia
Personally I'd be quite happy to see backwards compatability broken in this case to enforce the use of () or {}.

At least I partially got through to someone.


You are assuming nobody else had these thoughts, which is far from accurate. The thing is, your posts were suggesting the opposit.

Personally, i'd prefer to see the forced use of correct syntax (braces etc), rather than accomodate less use of correct syntax.

I doubt this will be changed either way, because BOTH way would break some scripts. Granted that forcing the use of braces in all cases would break more, there would still be a few that the other way would break, or alter the behavior of, due to the underlying logic change.

As for your rediculas assumptions about CS degrees and lack of understanding, you were wrong.
_________________________
"Allen is having a small problem and needs help adjusting his attitude" - Flutterby

Top
#178203 - 06/06/07 01:25 PM Re: Script parsing bug? [Re: hixxy]
RoCk Offline
Hoopy frood

Registered: 16/12/02
Posts: 2007
Ditto here hixxy, I think that unless the syntax is going to be enforced 100%, there has to be a line (tolerance). The example given in the OP of this thread not only exceeded that line, but kicked the lines dog, insulted its mother and then complained because the line didn't say thank you. The line is fine where it is.

Top
#178204 - 06/06/07 02:41 PM Re: Script parsing bug? [Re: hixxy]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: NC, USA
Originally Posted By: hixxy
I say leave it as it is. Using only one set of brackets isn't even what I'd call 'bad' coding, as it's still very clear what you're trying to do.


That's why I put quotes around "badly". I think leaving it as-is would be fine. Making it less strict would be bad. Making it more strict wouldn't necessarily be bad, but would break enough scripts that I doubt it would happen. Besides, the current method has worked perfectly fine for a long time, so there really isn't a reason to change it, so I agree with you. smile
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
Page 2 of 2 < 1 2