[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / siberia / hobby / tech / edu / games / anime / music / draw / AKM ] [ meta / roulette ] [ cytube / git ] [ GET / ref / marx / booru / zine ]

/tech/ - Technology

"Technology reveals the active relation of man to nature" - Karl Marx
Name
Email
Subject
Comment
Flag
File
Embed
Password (For file deletion.)

Join our Matrix Chat <=> IRC: #leftypol on Rizon


File: 1644512041101.png (362.53 KB, 4137x1953, ClipboardImage.png)

 No.13533

Thoughts?

 No.13541

I still think procedural programming is the best for 99% of use cases.

 No.13545

concurrent, functional languages are the most fun
lisp, haskell, lua, racket, etc

 No.14266

no contradiction because they're occurring at different levels of architectural abstraction.

also its funny how anons like >>13545 post every language but absolutely shit on Clojure

 No.14269

>>14266
I never programmed in clojure because I shudder at the thought of having to interact with java.

>no contradiction because they're occurring at different levels of architectural abstraction.

You probably need these "data oriented" functions somewhere down the stack, rightly in the case of a printf-like function, but I tend to see it as inelegant and adhere more to the common wisdom of having many functions interact with one data type. This could be distantly called object oriented, as bell labs described their C programming style, yet explicitly OOP languages want to push "objects all down" or whatever the fuck java is doing and in the case of java, these architectural conventions, declaration levels, instantiation rules and frequent Object casts/conversions end up in a mess.

 No.14270

>>14269
>want to push "objects all down"
The only place for the most part Java needs downcast is in the factory pattern where it returns a subclass based on conditions. Otherwise there isn't frequent use of down/up casting because they're written to an interface not as concrete classes/subclasses. IF you're frequently downcasting in Java something has gone wrong.

 No.14273

>>14270
>>want to push "objects all down"
My mistake, I meant "objects all the way down" although the JVM mixes in primitive types.

 No.14276

>>14273
oh you mean it forces OOP? yeah sure, it also includes tons of functional features too though since java 8+. you could make the opposite argument, Haskell forces FP as much as java forces OOP. BTW Lua isnt what id consider a functional language no functional features are really built in without using a library, its a very minimalistic language. Java is more FP than lua

 No.14282

Object oriented if you iterate through your objects, and much of the object is relevant in each iteration. Data oriented if you are iterating through the individual fields. Think about memory locality, try to make accesses to data be as close to each other in memory as possible when you plan your data layout. Also, DOD is just OOP but transposed.

 No.14283

>>13533
Programming is data structure + manipulation of data + IO.

OO is unnecessary, but it's convenient in certain contexts. A better model are things like typeclasses.

Immutable structures are great and make programs easier to think about. OO becomes an impediment and unnecessary with these.

Really, what benefit does OO bring that typeclasses don't?

 No.14285

>>14283
>Really, what benefit does OO bring that typeclasses don't?
typeclasses are just like souped up version of java interfaces/abstract classes with generics. you could easily ask whats the point of typeclasses when you have interfaces that can inherit and generics/template variables.

>Immutable structures are great and make programs easier to think about.

They use up a ton of volatile memory despite compiler authors best efforts under the hood. This is the primary reason why functional programming wasn't used very much until the 2010s outside lisp.

 No.14287

>>13533
>>13541
different tools for different situations, people and problems. Most modern langage combines the paradigms anyway

 No.14288

File: 1648673144148.jpg (54.1 KB, 599x630, UMLchads.jpg)

OOP? DOD? Procedural? Imperative? Slow down, anon, that is way too low level for our work here. Only languages that matter are modeling languages. Everything else gets sorted out nice and easy by the Black Box Process of codemonkeys. What they do is none of our concern

 No.14291

>>14288
funno

 No.14308

>>14288
shut the fuck up architect/consultant/BAcuck

 No.14309

>>14288
fb tier text meme come on

 No.14346

Good for different uses

Not really on board with OOP though, often it maps badly to your problem space and is too inelastic. Also inheritance is a fucking nightmare to keep straight together with other language features like generics.

.t i teach programming

 No.14347


 No.14348

File: 1649439351717.gif (2.96 MB, 498x280, KYS.gif)


 No.14357

>>14346
Everyone knows its composition over inheritance and object hierarchies aren't suppose to exceed 3/4 levels

 No.14552

Just use Rust, the borrow checker and type system will sort that shit out.

>>13545
They're nice and I'd jump for a pure FP job in a heartbeat, but FP langs still use a lot of memory and are ~half as fast as Rust or C/C++.


Unique IPs: 12

[Return][Go to top] [Catalog] | [Home][Post a Reply]
Delete Post [ ]
[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / siberia / hobby / tech / edu / games / anime / music / draw / AKM ] [ meta / roulette ] [ cytube / git ] [ GET / ref / marx / booru / zine ]