yeah, i still struggle with seeing the imperative order of operations in javascript code

object oriented in general is a layer of complexity that is made obvious by how much processing it takes to compile it, i am totally an OOP disrespector... composition > inheritance, consistency > expressivity

there is a whole culture of protecting their supposed prime wages by deliberately adding friction to the work

Reply to this note

Please Login to reply.

Discussion

javascript vm is awesome, javascript sux hard.

as all modern oop languages and theirs idioms and patterns.

Polymorphism is something that all of them got terribly wrong. And inheritance.

they are just bad ideas, at all

polymorphism isn't bad. quote:

"Polymorphism means that you write a certain program and it behaves differently depending on the data that it operates on"

-- Tom Kurtz

a lot of what you can do with polymorphism can be achieved with interfaces and templates (aka generics) with less ambiguity and lower compilation cost, that is facts

those differences can be very unpredictable sources of vulnerabilities and bugs

from my pov the only sane polymorphism is dispatching.

Nice rading here! https://clojure.org/reference/multimethods

And clohure's protocols are also awesome:

https://clojure.org/reference/protocols

yeah, they sound remarkably similar to interfaces

i like a lot of functional models but i think they don't cover you for actually that much... very nice for this kind of thing, but not so good for saving time and bugfixing on writing operations on mostly similar data types such as codecs

IMO, understanding how to write efficient codecs is a good thing for understanding how useful your programming language is, and i put an emphasis on efficient... inefficient, naive implementations are not difficult and easy to make bug-free but making them efficient often is a bit of voodoo haha

I think I agree. Sort of.

When you are purely functional you only concentrate on data. because functions are dull.

programming is only data transformation after all ...

yeah, performance optimization is the big cost with funcitonal languages, be it tail recursion or unfolding recursive stuff... recursion is very popular with functional languages but it has its own particular problems, i feel like the Go Authors have declined to add tail recursion to the language because the same logic is more efficiently expressed with for and switch and using concurrent channels and coroutines

wait what? go doesn't have tail call recursion, does it?

sorry, I read declined as decided, lol

yeah they declined it, it's something you can dig out of the golangnuts mailing list from at least 5 years ago, they just don't see the point of adding this feature to the compiler because of the dramatic computation cost

didn't know but it's type of smart decisions they tend to do.

unlike the whole module shit. that was ... hard

haha yeah... i refused to use modules for a whole year, they were buggy af lol

now, idk how we'd survive without it but i'm not sure they did it quite perfect, i still keep a GOPATH as a convenient way to organise all my repos

but it works!

there's some glitches here and there with dependencies sometimes though... the btcd and lnd repos notably are a shitfight of dependencies literally back to different versions of the same fucking repo, it's madness

I too can't imagine working without modules.

but it was hard for us early adopters

it probably boils down to compiler. tail call recursion is hard to do (right).

expensive compilation, same problem as OOP, which doesn't exist with imperative style structural typed, interface and simplified template generics

my compilation is done in under 3 seconds almost every time, idk how anyone can experience go compilation and wonder at why they put up with thees other languages compile times

i've seen C++ compilations blow right over top of my memory several times in the past, memory use, sheer time...

i mean, building our esteemed nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uqjqamnwvaz7tmwdaehgu3wv45kuatwv3a8wctw0f5kwtnnwpskxef0qyfhwumn8ghj7mmxve3ksctfdch8qatz9uq3yamnwvaz7tmwdaehgun4v5hxxmmd9uq32amnwvaz7tmjv4kxz7fwv3sk6atn9e5k7tcqyrhprfwl7sxpnf247s07g26g7q8xrry3yftz9t3hkmptkeahd38yj4jvnvj 's gossip client takes at least 5 minutes, i know it's a fairly sophisticated app but that is still over the top in my book

I am a build master in our company and it takes 50 minutes to compile our 35 milions lines of java code from scratch 😂

(without cashes and stuff)

well, yeah, java has some crappy build systems too... that is worse than i'd expect from Rust, but cargo basically rips off Go's build cache system