Quote:
Originally Posted by DMcCunney
He still programs in APL, using a descendant called K, and claims to be able to deliver completed applications in the time other developers spend figuring out how long it will take them to do it.
|
Shiiit.... I've looked it up, and that language is actually worse than regular expressions.
I can believe that guy, however. I've more than once seen people trying to do stuff using if-statements for things such as validation, replacement, and such. With some work, it is often faster and even easier to use regular expressions, and with a lot less code as well.
For example, I have an embedded web application, which actually runs on top of PHP. As it has no database, it uses a file called "app.conf.php". The settings are like this:
define("SETTING", "value");
Instead of reading the file line by line into an array of strings, finding the setting, replace the value and then writing back the entire file (which is the way I've seen such things done most often), I just use a command line call to 'sed', and replace the value using a regular expression. (And yes, a take into account that someone could have modified the file, and the setting is now stored as define ("setting" , "VaLuE")

)
Thus, I effectively replace (almost) an entire function with one line of code.
I can imagine that APL can do the same.