4 ms·
Sounds like it would be easier to just use C anyway.
by rhabarba 3y ago
Sounds like it would be easier to just use C anyway.
- benj111 3y agoEasier for whom? The whole point of high level languages is that you put in effort upfront to make everyone elses job easier. By you logic, using machine code directly onto toggle switches is easiest. No assembler to write, no test editor to write.....
- klysm 3y agoEasier is exactly what that wouldn’t be
- globular-toast 3y agoIt's even easier to just buy a desk calculator or even just learn long addition and do it with pencil and paper.
- rhabarba 3y agoActually, I generally recommend to not leave easy tasks to the computer. The brain likes to have to do stuff sometimes.
- llamaInSouth 3y agowhy waste time?
- deleted 3y ago[deleted]
- unnah 3y agoYes, but C is a much more arcane and complicated language. Case in point: instead of writing a+b in Python, in C you would have to write a+b (Jokes aside, it would really be more complicated in C if a and b were actually strings or lists.)
- Marazan 3y agoOr numbers that add up to over the size limit of what ever byte/int/long type you are using. There's a surprising amount of depth to adding two numbers.
- rhabarba 3y agoIf a and b are strings, Python would make "ab".
- fractalb 3y ago> it would really be more complicated in C if a and b were actually strings or lists You don't event need strings or lists for that. Just imagine bigger numbers for a and b. Arbitrarily long integer addition is not a native language feature in C. edit: formatting
- 082349872349872 3y agoto be concrete: fac = lambda n: 1 if n<=1 else n*fac(n-1) a, b = fac(42), fac(69) a + b is 3 lines of python; how many lines of C code would it take to execute?
- tgv 3y agoOne: return 1.7112245243e98 Joking aside: these are not catch-all comparisons. Nor is the article. But Python is mucher slower and much safer than C. It's easier to start in Python than in C.
- 082349872349872 3y ago;-P Just to be pedantic, if you're going to all the trouble to give (modulo lack of a repl) a wrong answer fast, might as well do it really quickly: return 0; in the hopes that compiles down to something like: xor rax, rax ret
- benj111 3y agoIt still isn't simple #! /Usr/bin/python Print(a+b) V #include <stdio.h> Int main (){ Printf("%i", a+b); Return 0; } And printf is basically a DSL, so it still isn't 'simple' And this is assuming a+b fits into an integer
- pjmlp 3y agoThere are plenty of AOT compiled languages, C isn't the only option, thankfully.
- DarkNova6 3y agoTell that your average data Joe and he will say "But C is a letter, not a programming language".