When I write code, I try to make it easy to read, understand, and maintain. I write comments. I indent code blocks. I use line breaks to spread the code out over multiple lines. I try to write code with a consistent style. However, I frequently find that JMP reformats my code without asking. It simply decides to obliterate all the effort that I put into good coding practices.
For example, I write a script and attach it to a data table. Then I right-click on the script and press "Copy" and then right-click in the script window and press "Paste". The copy of the script does not contain any of the comments or code block indentions that were in the original script.
Another example: I create a formula column on a data table. Inside of the formula editor block, I write some JSL code to perform an iterative calculation (this is really cool. I just figured out you could do this!). Of course I want to use comments and whitespace in this code, like I would in literally any code that I write anywhere. Well, after I hit enter, the comments are invisible until I double-click on the formula editor block. But they do exist. Until I click OK and JMP evaluates the formula. Next time I open the formula, comments and whitespace are gone.
It gets worse. I have multiple scripts attached to my table that all reference a certain column. Then I rename that column. All of these scripts are updated with the new column name. But in doing so, they are all "reformatted" by the JSL parser and all of my comments and whitespace are destroyed. ಠ_ಠ
What is the point of even having comments in the JSL language if JMP is going to immediately wipe them out at the first opportunity? Am I supposed to edit my JSL scripts in a less-hostile text editor (i.e. Notepad++) and store the readable versions as separate files? I just don't understand why it has to be this way. Please leave my comments alone!
Note: @Cwalla reported the same issue in the forums here