9 votes

Writing a polyglot script

1 comment

  1. feigneddork
    Link
    I like the idea and concept of a polygot script, but in reality it's often finding ways to jam two bits of code from different languages into one script. This means that one has to write the code...

    I like the idea and concept of a polygot script, but in reality it's often finding ways to jam two bits of code from different languages into one script. This means that one has to write the code multiple times in different languages, often meaning that a bug could exist in one code or not in another - or the code is maintained in one but not the other.

    I think the best approach is to pick a scripting language and stick to it. Most OSes have a lot of scripting languages either installed or ready to install and use so a lot of the pain is gone.

    My personal goto scripting language has got to be Python - for one it really is portable across OSes (Windows now has Python support through the Microsoft Store as well as a third party installer) and the syntax is friendly and readable enough so that if anything goes horribly wrong, debugging the code someone else wrote is pretty simple. Lastly, there are a plethora of IDE/text editors that support Python - my favourite would be Visual Studio Code for it's lightweight support while having PEP 8 support.

    1 vote