AutoHotkey Community

It is currently May 27th, 2012, 11:56 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 63 posts ]  Go to page Previous  1, 2, 3, 4, 5

Do you think people would use it as a programming language?
YEAH!!!
yes
maybe
not really
NO WAY.
You may select 1 option

View results
Author Message
 Post subject:
PostPosted: January 22nd, 2006, 8:26 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2545
Chris wrote:
JSLover wrote:
if (stoploop) break

It turns out that supporting "any command" on the same line as an if-statement would take longer to implement that it was worth (expression parsing makes it difficult to do). In addition, the benefit seems low because scripts that use that style are generally thought to be less readable.

Thanks for looking into it Chris :) . I can live with the current syntax for If statements as it usually works out to be much easier to read at a glance and troubleshoot.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 25th, 2006, 11:19 am 
Offline
User avatar

Joined: December 20th, 2004, 12:19 pm
Posts: 798
Location: LooseChange911.com Ask Questions, Demand Answers █ The WTC bldgs █ shouldn't have fallen █ that fast
Chris wrote:
(expression parsing makes it difficult to do)

...I don't know what all is considered an expression on an if, but I'd require outer ( )'s...I think this might work...

Code:
if WinActive("blah")
   msgbox, hi

...which could cause ambiguity, but requiring outer parens, should clear it up...

Code:
if (WinActive("blah")) msgbox, hi

...if not "any command", how about break/return/continue/(any I forgot)...the short commands to end something.

_________________
AutoHotkey-Hotstring.ahk - Helping the world spell "AutoHotkey" correctly! (btw, it's a lowercase k!)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 25th, 2006, 4:46 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
In addition to breaking existing scripts, requiring outer parentheses seems undesirable to me. But maybe you meant requiring them only when there's a same-line action present.

As for supporting break/return/continue on the same line as an if-statement, in my estimation the benefit is too small to justify the code size and development time.

I realize that decisions like this will displease a lot of people who like to write scripts in their own style. However, AHK isn't designed to please everyone -- I believe that even attempting to do so would be a losing battle that would do more harm than good in the long run.

Finally, a poll is always an option if you believe strongly that a certain alternate syntax should be supported even if it requires considerable development time and code size.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 63 posts ]  Go to page Previous  1, 2, 3, 4, 5

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 12 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group