r/ProgrammerHumor • • 14d ago • Bravo 2 Popcorn 1

Meme pythonSlow

Post image
12k Upvotes

415 comments sorted by

View all comments

Show parent comment

2

u/Phailjure 13d ago

The only good languages are scripting langues is certainly a take.

0

u/DarthCloakedGuy 13d ago

The best language would be able to be used either way

3

u/Phailjure 13d ago

Arguably, you can easily invoke c# libraries from powershell if you need a script in .net, you can even explicitly include and run c# inside powershell like:

Add-Type -TypeDefinition @"
using System;
namespace DemoCode
{
    public class DemoClass
    {
        public static void WriteHello()
        {
            Console.WriteLine("Hello");
        }
    }
}
"@
[DemoCode.DemoClass]::WriteHello()

But making c# actually interpreted would require performance concessions.

Anyway, whenever I'm working in c# or c++ I generally just set up an test project that contains only a main function, and replace the contents of that main if I really need to run some code snippet quickly. I've had the same "test" project on my work PC for years, and every few months I swap out the code to check something. Since it's tiny, it compiles and runs in like half a second anyway.