Valik Posted November 29, 2004 Posted November 29, 2004 I know it was asked, and I wish Jon wouldn't have. As I said, nobody was complaining about the names of most of the functions, but now we suddenly have a discussion on changing all the names. As far as .NET goes. Correct me if I'm wrong, but you do still have to type all the namespaces out. Obviously, you will use a using directive for the common stuff, but you aren't going to have using directives for every namespace you wish to access. That means, in order to call a function, you have to type out the fully qualified name, because otherwise, you're not calling the function. That means more typing and more work. Which means the names to call a function are long. Which means I compared apples to apples. As far as short names being explicit, they aren't. Abbreviations and acronymns can have multiple meanings, which leads to ambiguities. With the current function names, there is no doubt what that function does. A basic understanding of a few English words is enough to convey the intent of the function at first glance for even non-programmers. Besides, long names are in now as is the new optional/default parameter feature. If you want shorter names, you can write wrappers around the functions without losing any functionality at all. This means, scripts aren't broken (again) and the naming scheme of AutoIt remains consistent (Long, but explicit).
Valik Posted November 29, 2004 Posted November 29, 2004 Larry said: In AutoIt... Commands seem to follow...<subject><action><relative to action><GUICtrl><Create><Button><Win><Wait><Active>I really cannot budge on "GUICtrl" as it is the subject... "Create" or "Add" ... is a "whatever" moment for me... "Button"... obvious.We are talking about how difficult it is to type a few letters... well, that is what copy/paste is for and other means... I cannot sacrifice readability for the contentment of the weary fingered...Lar.<{POST_SNAPBACK}>Exactly Larry. You want to be lazy, use Auto-Complete. 'Nuff said.
this-is-me Posted November 29, 2004 Posted November 29, 2004 I do use autocomplete and I am lazy. That is why it is bothersome or cumbersome to type GuiCtrlCreate before I can autocomplete the rest of the control name. Who else would I be?
Administrators Jon Posted November 29, 2004 Author Administrators Posted November 29, 2004 Valik said: I know it was asked, and I wish Jon wouldn't have. I was bored. Needed to start a row. You know. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Valik Posted November 29, 2004 Posted November 29, 2004 Jon said: I was bored. Needed to start a row. You know. <{POST_SNAPBACK}>Good thing England has a small lake between it and the US, I have a 2x4 wanting to meet the side of your head.
this-is-me Posted November 29, 2004 Posted November 29, 2004 It is > bthrsm trying 2 fgr out how 2 rd this pst. Excuse me, That is why I did not suggest any abbreviations of names. I want it to be readable too. I just don't like to type as much before the type of control. Who else would I be?
MHz Posted November 30, 2004 Posted November 30, 2004 (edited) this-is-me said: It is > bthrsm trying 2 fgr out how 2 rd this pst.Excuse me, That is why I did not suggest any abbreviations of names. I want it to be readable too. I just don't like to type as much before the type of control.<{POST_SNAPBACK}>Being explicit is the way to go. It would be best. Building functions names on a jelly base would be unwise.Example of explicit, .Net style, trimmed down without Windows | System etc. :GuiMainCreate GuiControlCreateButton NonGuiControlClick NonGuiMouseGetCurser Gui | Main | Create Gui | Control | Create | Button NonGui | Control | Click NonGui | Mouse | Get | CurserEdit:Explicit or Simplicity?Perhaps a problem. Looked at all autoit function names.Explicit as described above, fails to show in all autoit function names?Ctrl and Control equals different etc. Abbreviations of names already in use.Perhaps a bad idea to enforce explicit function names? Yes/No Edited November 30, 2004 by MHz
JLC123 Posted December 1, 2004 Posted December 1, 2004 Just in case anyone has an interest in a complete newbies opinion, I'm all for the long names. It may be a lot of typing, but it's worth it to understand the code better. To me, the best thing about Autoit and the reason that I started using it is becuse it's the easiest "language" for a newbie to learn and understand. Two wrongs don't make a right, but three lefts do
Holger Posted December 1, 2004 Posted December 1, 2004 After sleeping some more nights about it I also think: let it like it is or let they like they are Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
Administrators Jon Posted December 1, 2004 Author Administrators Posted December 1, 2004 Fair enough, I'll leave them as is and just change the few that don't match (SendMsg RecvMsg etc). Hopefully that will keep me safe from the threatened 2x4 too Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
friends Posted December 3, 2004 Posted December 3, 2004 Jon said: Fair enough, I'll leave them as is and just change the few that don't match (SendMsg RecvMsg etc). Hopefully that will keep me safe from the threatened 2x4 too <{POST_SNAPBACK}>To me personally, I think I agreed with what Holger said.My opinion on this is, just try to reduce the drastic changes from one versionto another version, as this may totally freak out all the newbie.Just like the previous version 2 to version 3, they had a drastic changes ofthe names, syntax and so on. I know that may be "no choice" situation in orderto make this language user-friendly, however I hope that it would not happento this or coming version.I still prefer to stick to the existing long-name version where the readabilityis great although we have to type it a bit longer. Worth it and nothing comeseasily, right ?
Administrators Jon Posted December 18, 2004 Author Administrators Posted December 18, 2004 Just changing the code now so get ready for these renames shortly: GuiRead -> GuiCtrlRead GuiSendMsg -> GuiCtrlSetMsg GuiRecvMsg -> GuiCtrlRecvMsg GuiSendToDummy -> GuiCtrlSendToDummy Those will be the only name changes. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Josbe Posted December 18, 2004 Posted December 18, 2004 Jon said: Just changing the code now so get ready for these renames shortly:GuiRead -> GuiCtrlReadGuiSendMsg -> GuiCtrlSetMsgGuiRecvMsg -> GuiCtrlRecvMsgGuiSendToDummy -> GuiCtrlSendToDummyThose will be the only name changes.<{POST_SNAPBACK}>That sounds very well. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
tuape Posted December 18, 2004 Posted December 18, 2004 Quote GuiSendMsg -> GuiCtrlSetMsgGuiRecvMsg -> GuiCtrlRecvMsg For me it would sound more logical if GuiCtrlRecvMsg would be changed to GuiCtrlGetMsg. As long as the other one is GuiCtrlSetMsg.
steve8tch Posted December 18, 2004 Posted December 18, 2004 Just read through this post (well most of it ) What about having both a long hand and a shorthand function name. Just like you have 'Opt' is the same as 'AutoItSetOption' - you could have 'xCreateButton' - same as 'GUICtrlCreateButton' 'xCreateLabel' - same as 'GUICtrlCreateLabel' etc. I chose 'x' as a prefix but it could be anything This way the 'newbies' can continue to code with long readable function names and others can code quicker with shorter function names. This way SciTe would call up GUI autocomplete stuff very quickly. Just a thought..
Valik Posted December 18, 2004 Posted December 18, 2004 steve8tch said: Just read through this post (well most of it )What about having both a long hand and a shorthand function name.Just like you have 'Opt' is the same as 'AutoItSetOption' - you could have'xCreateButton' - same as 'GUICtrlCreateButton''xCreateLabel' - same as 'GUICtrlCreateLabel' etc.I chose 'x' as a prefix but it could be anythingThis way the 'newbies' can continue to code with long readable function names and others can code quicker with shorter function names. This way SciTe would call up GUI autocomplete stuff very quickly.Just a thought.. <{POST_SNAPBACK}>Its possible, thanks to optional parameters, to completely wrap every function in a shorter name without a loss of functionality.
MHz Posted December 19, 2004 Posted December 19, 2004 Valik said: Its possible, thanks to optional parameters, to completely wrap every function in a shorter name without a loss of functionality.<{POST_SNAPBACK}>That is a good idea.
Chetwood Posted December 21, 2004 Posted December 21, 2004 john925 said: I like CyberSlug's method. It's much shorter than the current names but still completely understandable.<{POST_SNAPBACK}>I agree with thatm I mean, why keep the CTRL in when we all know it's GUI stuff anyway? SoGuiCtrlRead -> GuiReadwould be my way to go but of course it's Jon's decision. And Jon, in case you get bored again, please just release a final with a definite GUI so I can revamp mine MultiMakeMKV: batch processing for MakeMKV (Win)MultiShrink: batch processing for DVD ShrinkOffizieller Übersetzer von DVD Shrink deutsch
jpm Posted December 21, 2004 Posted December 21, 2004 Chetwood said: I agree with thatm I mean, why keep the CTRL in when we all know it's GUI stuff anyway? SoGuiCtrlRead -> GuiReadwould be my way to go but of course it's Jon's decision. And Jon, in case you get bored again, please just release a final with a definite GUI so I can revamp mine <{POST_SNAPBACK}>Gui without GuiCtrl apply to the window. Following your proposal will lead to create new name to differentiate for instance GuiSetState and GuiCtrlSetState.For the time being GuiRead is an alias to GuiCtrlRead I hope you will agree to stay with this last proposal
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now