Threadser.net
數據
關鍵字
Threads
Login
串文
串文鏈結
2024-10-26 01:03
Dear Java people, I know you like OOP. But why do you have to have classes even when writting JavaScript!? 😂
讚
48
回覆
100
轉發
作者
WhiteSponge
thewhitesponge
粉絲
1,524
串文
277+
讚
回覆
轉發
24小時粉絲增長
無資料
互動率
(讚 + 回覆 + 轉發) / 粉絲數
9.71%
回覆 (BETA)
最先回覆的內容
發文後
用戶
內容
3 小時內
Ken de Guzman
kcjdg
We think the other devs who will read our and modify code, its basically for structuring and organization of code.
4 小時內
Apeiron Cheung
apeironcheung
Ok, I use struct then.
6 小時內
Adrian Shum
adrianshum
Why asking Java people question about JavaScript?
8 小時內
Claudio Ciccarone
claudio_ciccarone
I wrote some React components coming from Java and because JavaScript gives me more Python vibes compared to Java, I used Js objects to manage some logic. Of course after I changed the code but that was my first idea ahah
15 小時內
Matthew Zurschmeide
swords_meow
JS has few rules, and in general, the fewer rules a language has, the more footguns it has. Classes and object orientation are ways to create rules and not shoot yourself in the foot. Also, unless I'm mistaken, OOP is well suited for programming asynchronous bits. Really, the answer is probably to use Typescript to get some of what we want to get from Object Oriented design.
19 小時內
______ᴍᴀʀᴋᴜs______
markus_mulholland
Don’t we love talking shit about programming
一天內
Ashley Frieze
ashleyfrieze
Because they’re good for things… why do you have objects and then functions that operate on them, but divorced from them?