Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • 4
    What about getting rid of that language? Commented Nov 27, 2021 at 12:25
  • Different languages is something I have looked at, but every other language that is capable of doing the job doesn't meet other technical criteria. One alternative language for example does not even have procedures. I realise this looks like an X-Y problem without further background, but explaining for pages and pages why this really is the problem wouldn't help solve it. Commented Nov 27, 2021 at 12:47
  • 2
    @rvs it is a modern language, but it's a DSL with a graphical interface rather than a code interface. My pseudocode above is an approximation of the problem rather than how it's literally written (which is drag drop wisiwig stuff). The application of this is to build product tutorial videos - the gist is that when your UX changes, these scripts know how to rebuild your docs from scratch by following procedures you've written. The users are product people, not devs, so it's not practical to switch to a "better" language like Java. This is pretty advanced usage for this tool though. Commented Nov 27, 2021 at 13:22
  • 2
    @rvs and sometimes languages grow organically. E.g. Ansible (2012) is a tool for devops/configuration management that is driven via YAML files. It has “roles” that behave like subroutines. But it has no scoping, so that the convention is to prefix every variable with the role name. It's extremely tedious, but Ansible is still better than the alternative tools. Commented Nov 27, 2021 at 13:29
  • 1
    Also, avoid recursion, since using global variables as parameters and locals will not automatically stack as in other languages. In other languages parameters and locals are sometimes called automatics, as they are dynamically created upon invocation, and so recursive invocation means each one has its own copy of those variables. Commented Nov 27, 2021 at 14:55