Jump to content

Recommended Posts

Posted

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

Posted

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

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?
Posted

  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. :)
Posted

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?
Posted (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    | Curser

Edit:

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 by MHz
Posted

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

Posted

  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 :D

<{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 version

to 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 of

the names, syntax and so on. I know that may be "no choice" situation in order

to make this language user-friendly, however I hope that it would not happen

to this or coming version.

I still prefer to stick to the existing long-name version where the readability

is great although we have to type it a bit longer. Worth it and nothing comes

easily, right ? :idiot:

  • 3 weeks later...
Posted

  Jon said:

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.

<{POST_SNAPBACK}>

That sounds very well. :idiot:
Posted

  Quote

GuiSendMsg -> GuiCtrlSetMsg

GuiRecvMsg -> GuiCtrlRecvMsg

For me it would sound more logical if GuiCtrlRecvMsg would be changed to GuiCtrlGetMsg. As long as the other one is GuiCtrlSetMsg.

Posted

Just read through this post (well most of it :D )

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.. :idiot:

Posted

  steve8tch said:

Just read through this post (well most of it :D )

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.. :idiot:

<{POST_SNAPBACK}>

Its possible, thanks to optional parameters, to completely wrap every function in a shorter name without a loss of functionality.
Posted

  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. :idiot:
Posted

  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? So

GuiCtrlRead -> GuiRead

would 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 :idiot:

MultiMakeMKV: batch processing for MakeMKV (Win)MultiShrink: batch processing for DVD ShrinkOffizieller Übersetzer von DVD Shrink deutsch
Posted

  Chetwood said:

I agree with thatm I mean, why keep the CTRL in when we all know it's GUI stuff anyway? So

GuiCtrlRead -> GuiRead

would 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 :idiot:

<{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 :D

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...