r/ProgrammerHumor • • 2h ago

Meme theresTwoTypesOfLangagues

Post image
228 Upvotes

66 comments sorted by

47

u/MinecraftPlayer799 1h ago

Why is JavaScript Lisp? And why is Python C?

59

u/EatingSolidBricks 1h ago

Its a nod to the fact that the creator of JavaScript wanted to make it a LISP but was forced to make it more like java to hop on the trend theres still a lot of LISP blood under the Java shell

As for python it's just a imperative language as C as it gets

17

u/SuitableDragonfly 1h ago

Imperative is the opposite of declarative, not the opposite of functional. Most functional languages are also imperative. 

17

u/Puzzleheaded-Weird66 1h ago

Python's most common version just calls a bunch of C libraries and functions, as for js idk I've never studied Lisp

6

u/Vimda 1h ago

Python veered weirdly functional in it's early says with iterators/map/reduce etc

20

u/S4N7R0 1h ago

you never seen javascript's bs?

fetch("website.com").then((r) => {
r.blob().then((b) => {
b.text().then((t) => {
return t;
})})});

6

u/mokrates82 1h ago

What does explicit continuation passing have to do with Lisp?

3

u/tiajuanat 59m ago

Is that not:

(fetch "website.com"
  (lambda (r)
    (blob r
      (lambda (b)
        (text b
          (lambda (t)
            t))))))

3

u/mokrates82 57m ago

No, you omitted the .then(...) calls.

And you usually would just do (text (blob (fetch ...))) like a normal person.

4

u/atanasius 56m ago

First-class functions.

9

u/braaaaaaainworms 55m ago

Then Rust is Lisp

7

u/SaveMyBags 50m ago

You got it...

3

u/mokrates82 54m ago

Python has first class functions.

1

u/Makefile_dot_in 37m ago

C has first class functions & also traditional lisp doesn't even rly have first class functions, they have their own namespace and you use an object representing their name or a special lambda object iirc

1

u/Mateorabi 14m ago

Everything. 

0

u/S4N7R0 1h ago

a lot of parentheses

10

u/TorbenKoehn 1h ago

That’s just bad coding on purpose, we can do that in any language

2

u/LittleMlem 35m ago

I'm not a js programmer, but iirc that's kinda how you had to do it before async/await

0

u/Agifem 41m ago

Or maybe JS is just bad lisp that tries to copy C.

2

u/orzel_von_vandein 1h ago

Hello, how do you get more than one script logo on your flair, i keep trying but only the first shows up 😓

3

u/backfire10z 1h ago edited 1h ago

You should be able to make your own flair. When selecting, it shows a text box at the bottom with the emoji name. Type more in that box.

For example, “:py::cp:” shows Python and C logos (which is first two of my flair)

4

u/Tabsels 1h ago

What about Forth?

9

u/EatingSolidBricks 1h ago

Stacks and trees are isomorphic so LISP

2

u/Tabsels 1h ago

And Prolog?

17

u/EatingSolidBricks 1h ago

We don't talk about Prolog

4

u/AnxiousSquare 1h ago

and SQL

7

u/EatingSolidBricks 1h ago

LISP

4

u/WystanH 55m ago

No. Functional doesn't all mean LISP.

SQL is based on relational algebra. Give E.F. Codd his due. Gods know, Ellison didn't.

2

u/EatingSolidBricks 53m ago

Look man i were to be completely accurate the bit would lose it's identity

3

u/thecrazyrai 39m ago

C#?

2

u/EatingSolidBricks 36m ago

Do you need to ask?

3

u/shill_420 17m ago

See Java!

0

u/thecrazyrai 16m ago

"while having c in it's name, c# is actually lisp"?

76

u/noselike 1h ago

I think prolog is probably its own (WEIRD) third thing.

35

u/Saphieron 1h ago

The mycelium of the programming world

4

u/Sheerkal 44m ago

Soon mycelium will be the mycelium of the programming world. It's only a matter of time.

12

u/Tabsels 1h ago

It's less weird once you get to know it. It can just run (some of) its code backwards. Perfectly ordinary language y'know.

7

u/Nir0star 34m ago

I mean yeah they are called functional, imperative and declarative programming paradigmes. JS has some functional elements, and was very early in the imperative languages to have functions as first level citizens, but I wouldn't call it a functional language...

3

u/wurnthebitch 1h ago

And would Lean be some distant cousin?

8

u/S3bi161 35m ago

No, Lean would be very much a Lisp language in the sense of this meme. Even more so than Javascript etc.

Lean has a very classical functional programming paradigm, which can be utilized to write proofs according to the curry howard isomorphism, dictating a correspondence between (function) types and propositions. Fundamentally, the task of proving a proposition is nothing more than finding a term of some type, and thats not really different to writing any other functional code. (Granted, in particular when using proof tactics, your code will not look very akin to e.g. Haskell anymore, but fundamentally you only search for terms inhabiting your proposition type)

0

u/MissinqLink 17m ago

I think matlab is in a different category too though you could argue C

0

u/dim13 15m ago

Also Forth.

18

u/iamdestroyerofworlds 1h ago

JavaThcript*

7

u/Dario48true 1h ago

What about uiua 😈

2

u/MeowsersInABox 1h ago

Looks like basic with extra steps

•

u/UnchainedMundane 7m ago

I would have said it looks like a bastard child of APL and Forth but.... basic?? how come?

•

u/Thom2503 4m ago

Why/how does it look like basic?

•

u/ConceptJunkie 7m ago

Looks like APL.

6

u/Goatfryed 58m ago

What about brainfuck?

4

u/Kriss3d 1h ago

I loved programing back in borlands C++ days.

4

u/CompetitiveSleeping 1h ago

Assembly?

14

u/AngheloAlf 1h ago

C

9

u/2eanimation 1h ago

NAND gates? Believe it or not, LISP.

2

u/Oddly_Energy 1h ago

Or vice versa, I suppose.

I have always thought of C as a way of making assembly slightly more conceivable to the human mind.

2

u/NomaTyx 55m ago

I don't think that's any more true for C than any other programming language, to be honest. We meme about everything being undefined behavior in C so it might feel like you have just as much control, but assembly is so much worse. Unless you're writing inline assembly, of course.

3

u/Lucasbasques 1h ago edited 1h ago

Is all beeps and boops in the end 

3

u/Falgasi 1h ago

Thanks for giving me PTSD flashbacks to university course teaching lisp after I had about 3 months of programming experience in Java

3

u/RandomiseUsr0 59m ago

Excel worksheet language - LISP

2

u/mokrates82 1h ago

Python is a Lisp like Javascript.

1

u/I_Believe_I_Can_Die 1h ago

What about Brainfuck?

•

u/curious_s 0m ago

It is basically assembler for a different type of machine. 

1

u/This_Background7442 57m ago

Right so expressions vs statements is your criterium..

1

u/Freecelebritypics 55m ago

I mean, I find lisp incomprehensible but JavaScript and C languages are just fine

1

u/Fermion96 44m ago

Brainfuck?

1

u/orzel_von_vandein 1h ago

Laughs in whitespace, befunge, piet and brainfuck