I have a few perl scripts and they need to be converted into some more common language such as Java so that in the future it can be modified and enhanced with ease as it is easy to support a Java code and people are easily available who know java. My boss has asked me to make a framework so that when convertng the scripts the real code becomes really small.
In a way he wants me to make a utility file which can be used to convert long scripts into small scripts by importing functions from that utility file.
So I want suggestions as to what language will be most suitable for this purpose and how should I do it.
Like I was thinking of converting them into java O O but I am unsure if that is a good idea as the exisiting code is scripts(non-O o code).
what language will be most suitable for this purpose
Perl. Interpreter inluded in every Linux distro, simple syntax, pretty powerful.
Why you need to convert them? Continue to use it and if you need to extend it just rewrite functionality in another language. Converting code between different paradigm languages is hard, ledas to a dirty code and lower speed.
I understand that Perl as good as any other language but my boss says wants it in a more common language like java for which support is easily available.
He says we don't have any Perl guys around and soon the code will be extended and later if we tried to convert it to some other language then it will be much more work than what it is now. So he wants me to make a framework through which we can write scripts with ease.
I haven't really worked in scripts much and I am begineer in the coding world. I know O o so thought of converting scripts into O o.
I also want to learn so I don't want any tool which will readioly convert perl into java. So I want to write my own code.
I want suggestions as to what language should I use JavaScript or Java O o or C++?
later if we tried to convert it to some other language then it will be much more work than what it is now
Why? I actually don't see how the same code will becomes harder to rewrite. It isn't milk, it will not became spoiled.
Converting code from Perl to Java is pretty much impossible. Only you could do is rewrite it. As in, understand what that code is doing and write code which does the same.
@MiiNiiPaa I mean we will be extending it much more ... based on the existing code will be producing more code so later when it will be many more files than now it will be hard to rewrite so many files. Moreover he wants to rewrite the code because those are all individual files and extending it further is hard but if we have a common framework then extending it will be easier as the framework will be base for rest of the code but right now there is no one base file but many.
So he wants to rewrite the code in a more common language so that in the future who ever uses it nobody will have to first Perl like I am doing now.
I am just asking if it is a good idea to rewrite the scripts in Java which is an Object oriented language and not a scripting language
Aside from Perl I could suggest Python for scripts. Or Lua.
Actually I were suggesting leave it as is and if you need to extend functionality, you will rewrite code in your language of choice on your created framework. That way you will do only work that actually needed. Like lazy evaluation. And as time passes there will be less code in Perl and more in your language.
Remember about three virtues of programmer:
“Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris.”
- Larry Wall