r/ProgrammerHumor • • 2h ago

Meme theresTwoTypesOfLangagues

Post image
339 Upvotes

82 comments sorted by

58

u/MinecraftPlayer799 2h ago

Why is JavaScript Lisp? And why is Python C?

83

u/EatingSolidBricks 2h 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

27

u/SuitableDragonfly 2h ago

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

19

u/Puzzleheaded-Weird66 2h ago

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

31

u/S4N7R0 2h ago

you never seen javascript's bs?

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

7

u/mokrates82 1h ago

What does explicit continuation passing have to do with Lisp?

8

u/tiajuanat 1h ago

Is that not:

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

6

u/mokrates82 1h ago

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

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

•

u/setibeings 1m ago

Less lisp oriented programmer, I'd bet.

6

u/atanasius 1h ago

First-class functions.

11

u/braaaaaaainworms 1h ago

Then Rust is Lisp

11

u/SaveMyBags 1h ago

You got it...

3

u/Aelig_ 20m ago

Well duh. Haskell nerds were really hyped by early day rust when they thought it was going to be the next big functional language and then it became a systems language which meant it had to be more imperative.

4

u/mokrates82 1h ago

Python has first class functions.

1

u/Makefile_dot_in 1h 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 1h ago

Everything. 

0

u/S4N7R0 1h ago

a lot of parentheses

15

u/TorbenKoehn 2h ago

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

7

u/LittleMlem 1h ago

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

1

u/TorbenKoehn 35m ago

No you could always chain .then().then() instead of entering closure hell (nesting)

•

u/LittleMlem 6m ago

Huh? This is a then then then. Am I misunderstanding you?

-1

u/Agifem 1h ago

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

7

u/Vimda 2h ago

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

2

u/orzel_von_vandein 2h ago

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

4

u/backfire10z 2h ago edited 2h 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)

•

u/orzel_von_vandein 4m ago

Well, its what i tried to do

2

u/FumbleCrop 31m ago

JavaScript's origin is as a LISP dialect hacked to resemble Java.

6

u/AnxiousSquare 2h ago

and SQL

10

u/EatingSolidBricks 2h ago

LISP

7

u/WystanH 1h 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.

3

u/EatingSolidBricks 1h ago

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

6

u/thecrazyrai 1h ago

C#?

3

u/EatingSolidBricks 1h ago

Do you need to ask?

6

u/shill_420 1h ago

See Java!

-1

u/thecrazyrai 1h ago

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

4

u/Tabsels 2h ago

What about Forth?

10

u/EatingSolidBricks 2h ago

Stacks and trees are isomorphic so LISP

2

u/Tabsels 2h ago

And Prolog?

20

u/EatingSolidBricks 2h ago

We don't talk about Prolog

103

u/noselike 2h ago

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

45

u/Saphieron 2h ago

The mycelium of the programming world

8

u/Sheerkal 1h ago

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

16

u/Nir0star 1h 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...

10

u/sambeau 24m ago

Yeah, it’s more of a disfunctional language

•

u/catbrane 2m ago

Internally, javascript is a lisp interpreter with a parser for a C-like language on the front. It looks imperative, but under the hood it's functional.

14

u/Tabsels 2h 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.

3

u/wurnthebitch 1h ago

And would Lean be some distant cousin?

12

u/S3bi161 1h 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)

-2

u/MissinqLink 1h ago

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

0

u/dim13 1h ago

Also Forth.

22

u/iamdestroyerofworlds 2h ago

JavaThcript*

11

u/Dario48true 2h ago

What about uiua 😈

2

u/MeowsersInABox 2h ago

Looks like basic with extra steps

1

u/UnchainedMundane 1h ago

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

1

u/Thom2503 59m ago

Why/how does it look like basic?

1

u/ConceptJunkie 1h ago

Looks like APL.

1

u/Darksorcen 40m ago

It's Lisp

8

u/Goatfryed 1h ago

What about brainfuck?

6

u/feelmemortals 1h ago

Esoteric

2

u/Stoopid_who_reads 10m ago

About as pure a functional language as you can get. LISP

5

u/Kriss3d 2h ago

I loved programing back in borlands C++ days.

5

u/CompetitiveSleeping 2h ago

Assembly?

19

u/AngheloAlf 2h ago

C

15

u/2eanimation 2h ago

NAND gates? Believe it or not, LISP.

5

u/Oddly_Energy 2h 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.

3

u/NomaTyx 1h 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.

1

u/FumbleCrop 30m ago

C with uglier syntax.

5

u/RandomiseUsr0 1h ago

Excel worksheet language - LISP

3

u/Lucasbasques 2h ago edited 2h 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

2

u/mokrates82 1h ago

Python is a Lisp like Javascript.

2

u/Fermion96 1h ago

Brainfuck?

2

u/ekauq2000 42m ago

RPG IV?

1

u/I_Believe_I_Can_Die 2h ago

What about Brainfuck?

1

u/curious_s 55m ago

It is basically assembler for a different type of machine. 

1

u/Freecelebritypics 1h ago

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

1

u/araujoms 50m ago

JavaScript is LISP in the sense that Charles II was the son of Philip IV.

1

u/PrepositionStrander 39m ago

Prolog ain’t functional nor procedural.

1

u/mrheosuper 19m ago

What is Verilog then ?

0

u/This_Background7442 1h ago

Right so expressions vs statements is your criterium..

1

u/orzel_von_vandein 2h ago

Laughs in whitespace, befunge, piet and brainfuck