4 ms·
I always saw Python and similar languages (Perl, Ruby, PHP maybe) as attempts at replacements for complicated shell scripts, so it never seemed odd to me that t
by jeffreyrogers 6y ago
I always saw Python and similar languages (Perl, Ruby, PHP maybe) as attempts at replacements for complicated shell scripts, so it never seemed odd to me that there was no main function, since a shell script has no main either. It just starts executing at the top.
Edit: Just saw that ktpsns and I made pretty much the same comment. I'll add that when I learned C I found the idea of a main function so confusing at first. I wanted to know why it had to be called main and not whatever else I wanted it to be. On the plus side, it led to me exploring how compilers and linkers work, which made me understand hardware a lot better.
- JKCalhoun 6y agoI was reminded of BASIC (also with no main()) and replied similarly.
- benbristow 6y agoInterestingly C# is introducing top-level programs now. https://devblogs.microsoft.com/dotnet/welcome-to-c-9-0/#top-level-programs https://devblogs.microsoft.com/dotnet/welcome-to-c-9-0/#top-...
- CodesInChaos 6y agoLooks pretty similar to csx scripts