[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: images.png (2 KB, 350x144)
2 KB
2 KB PNG
quite literally the best syntactic sugar
>>
>>106977253
It's breddy good but even better in combination with null coalescing operator.

var fugg = thing?.GetTheThing() ?? throw new KysException();
>>
>>106977253
yeah i fuckin love kotlin
>>
the emo haircut of ternary operators
>>
>>106979252
This is a C# thread.
>>
>>106979371
never used it before. have i been missing out all along?
>>
For me, it's the ternary operator.
>>
>>106979496
C# is a pretty nifty language with documentation almost as good as PHP.
one downside is once you start using linq you basically use it everywhere

does anybody in this thread know if they solved the event/delegate memory leak problem?
>>
>>106979496
Yes but not that much IMO. It's literally just syntactic sugar:

https://thoughtbot.com/blog/ruby-safe-navigation

I would argue that you should never deeply nest field accesses like this, but to each their own. I don't feel strongly about it because I'm not a Jewish Chinaman from big tech.
>>
Object oriented languages are such fucking cancer. Instead of debugging your actual logic you spend all your time refactoring some rigid class hierarchy and fucking around trying to architect your code to get around limitations of the object model.
Object oriented was a fucking mistake. Big sign of a shitlang is when it does shit like
namespace Blah {
class Program {
public static int Main(String[] niggers) {
// YOUR ACTUAL CODE GOES HERE!
}
}
}

I tried to use C#, it's not a bad language at all except for the fact that I'm forced to go three levels of indentation deep to type ANY code at all. Fucking painful and annoying. (Later versions of C# let you skip that, which is great, but I'm stuck on an old version of visual studio.)
>>
>>106977253
What does the dot do?
>>
I mean couldn't it just be ? without the dot
>>
>>106977253
JFL at having nullable fields. Variant types are almost always a bad idea, they invariably introduce edge cases.
>>
>>106979371
UHHHMMMM EXCUSE MEE, this is a javascript thread
>>
>>106979496
It's alright but all the C# production code I've seen is horribly bloated.
It's based on Java and I think the point of Java is to maximize the number of lines of code for the purpose of creating busy work.
>>
>>106979496
There is no reason to use c# over kotlin. Kotlin (java vm) has much better cross platform support as well as being a better language in general.
>>
>>106981529
Nigger the { } brackets ARE the namespace. That's the whole point of them and why languages without them are retarded
>>
>>106977253
monads for the uninitiated
>>
>>106981529
I agree with you fully

OO was made for people too weak to understand programmatic programming

(and spoiler alert, C++ code runs like shit when you scale it up)
>>
File: haha.png (153 KB, 314x329)
153 KB
153 KB PNG
>>106987633
for example:
>erm, let me use a shared_ptr which was first implemented in C++ 11 (I know this because I am autistic)
>Surprise! The code breaks down and crawls to a halt in multi-threaded scenarios because there are atomic locks on the pointers!
>Golly gee! I wish I hadn't relied on this endless well of useless features I could have implemented myself, instead of learning this endless well of bullshit that only benefits me in job interviews!
>>
>>106987633
The problem with OOP comes from how it originally tried to represent the actor model, this is not how computations are done in a program since for an actor model you'd need N different computational machines (or threads) for N instances for them to implement a proper actor model, this is why it's trivial to implement in distributed computing environments.
it's not a model for computation but for orchestration.
>>
>>106987671
This.
When I learned to link with the non-multithreaded libs, it made everything 20 times faster.
I don’t always (hardly ever) write multithreaded programs, and when I do, you can create muktipke heaps per thread instead of locking all the memory
>>
File: 1743485740798052.jpg (86 KB, 1080x1080)
86 KB
86 KB JPG
>>106977253
>>106979161
(?) (a : Option a) b = c -> case a of Some _ -> b | None -> c

thing ? (thing.get) raise
>>
>>106985962
> java VM
Never viable from day one.
Oracle will eventually kill it. And good riddance.
Basic Hello World runs in 500 MB code+mem which is insane.
Call me when all the /usr/bin binaries are re-implemented in Java.
>>
>>106977253
just make it default for dereferencing
>>
>>106977253
Can it be used in expressions yet?
>>
>>106985962
kotlin is ugly, just use java
>>
>>106987759
No one uses java for the Hello Worlds.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.