[ home / overboard ] [ date ] [ soy / qa / raid / incel ] [ int / pol ] [ a / biz / fit / mtv / r9k / sude / tech / v / x ] [ q / news / chive / rules / pass / bans / status ] [ booru / wiki ]

A banner for soyjak.party

/tech/ - Soyence and Technology

Download more RAM for your Mac here
Catalog
Email
Subject
Comment
File
Password (For file deletion.)

File: df68aeb4d1320aed94311abc65….gif 📥︎ (2.69 MB, 500x500) ImgOps

 №44138[Quote]

What does /tech/ think of functional programming? OOP has its merits, but in my experience with Java and C#, it very often devolves into unnecessary abstractions, boilerplate, and design pattern autism. FP feels more direct since you’re focused on expressing the actual computation rather than wasting a gorillion hours designing class hierarchies and dealing with architectural bullshit. I also like how naturally it connects math with programming, like through recursion for example. The declarative approach just makes more sense to me. Even if you never use a functional language professionally, I think FP teaches you a lot about programming fundamentals and how to reason about code.

 №44139[Quote]

Oh and also imo if you primarily write OOP, you should still learn FP and spend some time actually coding in a functional language. I genuinely think it makes you a better OOP programmer by teaching you to manage state, reduce unnecessary abstractions, and write cleaner, more composable code.

 №44151[Quote]

Holy fucking dead nigger board

 №44154[Quote]

>>44151
>goes on dead nigger board
>complains about dead nigger board
do shartycucks really?

 №44156[Quote]

>>44154
it is bad that dead nigger board exists

 №44181[Quote]

do not use any patterns or functions, rely exclusively on global variables throughout, ensure that multiple threads access the same variable, avoid using lists or arrays and simply use as many individual variables as you need, make sure your code has as many side effects as possible, make sure you declare a pointer variable for every variable and instead of accessing the variable directly, dereference it through the pointer

 №44182[Quote]

File: singing.gif 📥︎ (962.53 KB, 220x220) ImgOps

>goes on dead nigger board
>complains about dead nigger board

 №44199[Quote]

procedural mogs everything btw

 №44202[Quote]

>>44138 (OP)
I use functional programming or functional-like operations whenever possible in Java and C#. I really like Java Streams and C# LINQ. Rust's iterators are really good, as well. Not so much a fan of C++'s ranges/views, though, but C++ does at least provide monadic types like Optional and Expected just like Rust.
Also
>muh OOP class hierarchies and design patterns
Class hierarchies are unironically good and design patterns should only be used when appropriate. Java is not "verbose", it is explicit and clear and is much more of a pleasure to write than C++

 №44203[Quote]

>>44199
No it doesn't Ranjesh, go finish your CS50 assignment before your Claude tokens run out

 №44214[Quote]

>>44202
Bro I did my internship at a corporate company and the people there are fucking cattle. One department was still using Java 8, so I assumed that the C# department would be less of a nightmare with the latest version of .NET. I was fucking wrong. They had the best toolbox on the market, but they still built everything like 2012 enterprise slop. Ofc design patterns and class hierarchies are good, OOP is not the issue, its the culture. These retards never ask "do I actually have the problem this pattern solves?" They paste these fucking patterns everywhere because some senior told them to. Also I’m not joking, I once had to explain to a .NET senior what a fucking pointer is. This is the guy deciding the architecture btw.
<
Fyi, I was a .NET backend intern, so here is a real example. One endpoint to get a user by id. That’s ONE query. Sounds easy, right? How could you possibly fuck that up? I opened the codebase and found IUserService, UserService, IUserRepository, UserRepository, UserDto, UserViewModel and UserMapper. Seven fucking files for a single SELECT. And the repository sat on top of Entity Framework, which already gives you DbSet as a repository and DbContext as a unit of work. These fucking retards built a repository on top of a repository.
>muhhh what if we switch databases someday
Man just shut the fuck up. Who has ever switched databases on a real project? And if you do, you’re rewriting half the app anyway..
<
I swear, work at a corporate company long enough and you start despising Java and C#, which is a real fucking shame because they’re good languages. These nigger slaves have bastardized OOP so badly that devs would rather write fucking javascript than deal with another 15 layers of abstract factory bullshit.

 №44220[Quote]

I find functional interfaces to be easy to review, on nice example in the SI era

 №44223[Quote]

>>44214
You're right that corporatised OOP architecture is nonsense. A couple internships ago I worked for a company that used .NET and the Windows Presentation Forms setup they had was so needlessly abstractified with MVVM and other corporate design patterns. That being said, though, I'm only really opposed to it being used on several individual UI components, which is what they had. Whenever I write C++ I find it much more healthy in the long run to use the same corporate abstractions to give myself the same scalability. I don't mind paying the price of added work ahead of time if it means building onto existing architecture (such as services) is dead simple rather than just building another singleton and all.

The unfortunate reality is that companies use number of lines of code written per day as the metric and that's what incentivises all the bullshit. I'd still choose Java or C# for most cases, such as spinning up a microservice or running a web application, and it's a hell of a lot better than jeetscript anyhow

 №44253[Quote]

File: cope_projector_9000.png 📥︎ (201.96 KB, 640x640) ImgOps

>No it doesn't Ranjesh, go finish your CS50 assignment before your Claude tokens run out



[Return][Catalog][Go to top][Post a Reply]
Delete Post [ ]
[ home / overboard ] [ date ] [ soy / qa / raid / incel ] [ int / pol ] [ a / biz / fit / mtv / r9k / sude / tech / v / x ] [ q / news / chive / rules / pass / bans / status ] [ booru / wiki ]