3 ms·
Syntax
by aabhay 4y ago
Syntax
- spookie 4y agoI really don't see how AHK's script language is somehow not intuitive or simple enough. The syntax is pretty easy to grasp. You have all the tools "natively" to even pick positions on windows, its pretty extensive too.
- mmmpetrichor 4y agoI write AHK scripts like once or twice and then forget about it. I can't remember the sytax so I'm constantly googling. I'd rather have it in a language I already know well. Also as a long time programmer who knows a lot of languages, the AHK syntax (at least in V1) was anything but intuitive. It had very weird conventions.
- spookie 4y agoFair enough
- Fnoord 4y agoI find the syntax easy and the documentation (of v1, not enough experience with v2) is easily accessible and of high quality. V2 solves some inconsistencies in the syntax and language but at the cost of being compatible with v1. I've been able to port my v1 scripts to v2, and I'm a lousy programmer.
- BrandoElFollito 4y agoThe syntax is a nightmare. I honestly never understood why they made it so complicated. Should I use a brace? On the same line or on a new one? How to pass parameters, with or without paranthesis? Should I use ::? There are many such issues. I love AHK but every time I wrote a script or is trial and error to discover the proper syntax.
- fragmede 4y agoIn today's polyglot software development world, one real difference between someone who's a programmer and a software developer is fluency in multiple languages. That might come off better when it's Python and GoLang/C++/Rust instead of AHK, but realistically, every domain has their own DSLs. A competent software developer should be able to check their ego and use curly brackets instead of PEP 8 4 spaces if that is what the situation demands. And also be able to resist the urge to reformat an entire Python codebase that was written to 2 spaces.
- mmmpetrichor 4y agoWho's using AHK as a developer? I use it a a hobbyist. I don't want to have to remember a proprietary useless language syntax.
- 2Gkashmiri 4y agoComing from an ahk user circa 2010, I have never been able to wrap my head around pythons insistence on indentation. Ahk let's me type whatever however and it just works.
- jdrek1 4y agoHonest question, why? If you properly format your code then it's indented anyway so Python is basically just replacing `{` with `:` and then not having a `}`. Python is the least problematic of all the languages enforcing some style things. Go insisting on Google's stupid styleguide is just dumb, Lisp having the parentheses on the wrong positions and ignoring the fact that there is more than one bracket type available is dumb, all the languages with `END` blocks are dumb because `{ ... }` is much shorter and cleaner, ... . Python has its annoyances too but indentation really isn't a problem - it's there already anyway.
- 2Gkashmiri 4y agoas i said, i am not a dev so i never learned "convention".... AHK let me scrap whatever script from internet or i could come up, throw them in notepad and it would work.... now, python makes you "properly indent" which coming from AHK makes my head explode https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fci4.googleusercontent.com%2Fproxy%2FTfqJZgc0XX9Th3GmWu12_2Q-uEA94rar5Art2qlFTJK7uqH_4lU19LkRVDx-C2QyzFPXPBybC1e-R_lhKnkuuqlyCgGYX1aF0xLi4wGNc1aDu_9z%3Ds0-d-e1-ft%23https%3A%2F%2Fi1.faceprep.in%2FCompanies-1%2Fpython-indentation-example.png&f=1&nofb=1&ipt=339ea787716c2491ef0d27396d774f24afadd3658c0266e7953098fd29005ba6&ipo=images https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2F... this is a good example. AHK would read this normally but no, python sees whitespace and wants to "use that".... https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.guru99.com%2Fimages%2FPythonnew%2FPython10.2.png&f=1&nofb=1&ipt=9f77b32f1015b056fca37f353660ab8fd47c68644758b4358e5a92f74495e44d&ipo=images https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2F... this would never happen on AHK so it makes me mad. part of the reason why i have never gotten hold of python while i can whip up an AHK script in my mind