Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
bad-frog5524y@BobbyTables
hey devs, hwru, i got a f* question
how comes oop is a loss without remission
with your permission, id rather keep my passion
what i need is some C and some tits to serve as cushion
without discussion, thats what it is about
if i could i would, but there is no life without
so food or booze, in my mind there is no doubt
tig bitties, aig bass, amd masterclass
so oh! oop is like remakin the wheel
so far let em be, because i do feel like chill
but then some fool needs to make another tool
better we let him drool cuz algorythmic's old school
so adhd aint gonna help with that
cuz in fact its more their attention span is fat
or rather obese, and morbidly so
my mind goes faster f* on alcohol!
dont speak of weed, or it might have hurt em
and even less of prog, it might dishearten them
maybe they heard a thing but they just never saw
they will never know how to be "in control"
lel. its been ages... -
bad-frog5524y@frogstair :)))
nature tends to balance itself.
you must be very nice.
bc im veeery bad -
Well, objects are in fact just structs with attached functions. Just imagine the first argument always being the object (Python does it like that by the way).
But did you know, that JavaSript actually is the functional language with the least features common to functional languages? -
bad-frog5524y@iiii https://stackoverflow.com/questions...
the question is much more interesting than it would seem at first glance -
@iiii
Look at production code.
Almost all frameworks and even non-frameworks start with a closure, which is used to initialize some structure by filling a fresh map with values and functions, making it an object with methods.
In general, the language seems to encourage a declarative functional style while only providing the absolute bare minimum (functions as values and function creation at runtime) needed for a functional language.
The functional paradigm matches well with its declarative prototypic objects (it is the only language i know, that does OOP that way).
So of course it is multiparadigm (as almost all production languages are today). But its bare minimum functional capabilities aren't just a gimmik. Closures and closure passing are used everywhere.
Now imagine, one would add tail recursion and curying.
JavaScript's type system doesn't allow for algebraic data types or generics - but TypeScript has generics and could add ADT. -
iiii92194y@Oktokolo I don't have much experience with JavaScript, but it didn't ever stick to me as a prominently functional language. If anything, it seemed very procedural in it's vanilla form. If frameworks tend to incline into some sort of functional style, does not really mean that the language is functional. Nowadays almost every major language has some "functional" bells and whistles.
-
Inxentas7904yBackend devs have all these beautiful maxims to code by. At the frontend, we have one too:
Nothing is true, everything is permitted.
Related Rants
hey frontend devs,
i got a qweshtiun:
how come half of yous communicate in wordsalad?
also: ur methods are functions and ur objects are structures. wth is it all about?
random
js