Hacker News new | ask | show | jobs
by mojuba 4419 days ago
The point of scripting is to do things quickly at the expense of possibly being ugly. Most of the things we do in the UNIX shell are one-off local stuff. I want to rename all file extensions in a directory. I want to find a regex in files ending with .c and .h excluding the .svn and .git directories. Etc etc.

So I'm sorry but a "scripting" language whose print operator is longer than 5 chars is not a scripting language :)

2 comments

    Action<object> print = Console.WriteLine;
I mean, it's not perfect but you can also create a .Dump() extension method for all objects like Linqpad does. It comes really handy.
Also, I like Scala REPL's automatic labels for the results.

    scala > 7 * 7
    res0:Int = 49
    
    scala > res0 - 9
    res1:Int = 40
Saves a lot of typing.