What are some enjoyable languages to write in?

What are some enjoyable languages to write in?
I want to enter the zone and create stuff for a change, pic related is legit giving me a depression.

Attached: serveimage.png (1200x1349, 69K)

assembly

C# has been nice, coming from C++. Especially .NET Core being cross-platform.

What about modern languages like Kotlin or whatever else Jow Forums advertises?

Haskell

Attached: haskell-chan2.jpg (480x480, 56K)

Not sure. I'll work with it this week and see how things go. Getting into C# was on impulse, and Kotlin will be too.

TypeScript

Haskell. Or any Pure FP language.

Why FP. Redpill me pls

Have you tried functional programming in C++?

Is this a joke?

I don't make jokes, friend.
template
template
Result Result::MapOk(function f) {
if (this->IsError()) {
return ReturnError(get(this->Read()));
} else {
return f(get(this->Read()));
}
}

This is bind (>>=) for my Result type which can either be the value I want or an Error. So it's sort of like Optional/Maybe but with error handling involved.
I was inspired a lot by Haskell, and I find this a good way to solve all error handling in the software I am currently working on.
I can simply handle errors in one place, I just need to use my OnError() method for the result type and it will take care of everything.

I use C++98 and what is this?

he's memeing you.

Just learn Haskell

Haskell is a meme the most use you will get out of it is impressive FizzBuzz solutions in Jow Forums shitposting threads.

Learn C# or Java like everyone else.

So I made a Result type which can either be T or an Error.
But I don't want to manually unpack my T value all the time, so I made MapOk, which will unpack T and apply a function for me, as long as Result is not an Error. Let us say I have a Result called r1 then I can do the following:

Result func(uint64_t uint) {...}

r1.MapOk(func);


MapOk unpacks the uint64_t value in r1, if it's not an Error, and then it will apply func to that value and return a Result.

I can then keep on doing this:

r1.MapOk(func1).MapOk(func2).MapOk(func3).OnError();


It's a very nice way to compose computations and do error handling.

Python, C#, Java, TypeScript

Ruby. At least, it sells it self as a fun language.

It's worth learning Haskell in the long run considering a lot of popular languages, including C# and Java, are basically importing features from Haskell.

Why not use exceptions?

This is why nobody likes C++ programmers.
Yes, you can technically do this kind of insane retarded shit
No, you should never do it, but OH NO, MUH TEMPLATES AND LAMBDAS AND TEMPLATED LAMBDAS IT'S SO ~EXPRESSIVE~
It's also indecipherable write-only trash

C

Like what? Lambda functions? You can learn those by just using other programming languages.

You don't need to waste time learning haskell to understand how functional programming works

What do you guys think about fortran, i saw a thread earlier and it seems interesting.

>Lambda expressions and anonymous functions originate from Haskell
You can't seriously be this retarded

This way I can handle errors as a part of my typesystem and all my error handling is done in a single place. I never have to check for errors, I just return an Error and then let my error handling actually handle it.

It's not different than doing functional programming in C#, which I also like. Stay mad brainlet.

Have you tried building a house from ass hair?

Do people actually do this nowadays in a professional environment?

I didn't say that you mong. But a lot of functional C# features are directly inspired by Haskell. Hell LINQ was implemented by some category theory Haskell programmers are MS Research.

java

I wouldn't recommend using C++ like this professionally, it's just a good exercise. But in the future we'll get Either types in C++ which can actually do this shit.

t. brainlet

rust has a comfy type system that has borrow checker that stops you from making bad object graphs at compile time

if you're too normie for rust swift has basically the same type system but without the borrow checker and with "classes" shoved in alongside structs and enums to make everything worse

>Directly inspired by Haskell
>Lambda expressions and anonymous functions originate from Haskell
Again, you cannot seriously be this retarded. Did Haskell also invent arithmetic and the abstract concept of a linear map too?

t. ass hairlet

>It's not different than doing functional programming in C#
It's very different. Stop writing obtuse unnecessarily convoluted bullshit by wrapping everything in 8 layers of feature creep.

Are you implying languages are inspired directly by lambda calculus when they add lambda functions?
You seem like a special kind of person.

I don't think you saw my other message.
>I wouldn't recommend using C++ like this professionally, it's just a good exercise. But in the future we'll get Either types in C++ which can actually do this shit.

Kotlin's great. I absolutely hate Java and typically program in C btw, if that gives you any background.

This is pretty neat. This is why I love C++. It's going to get even better with metaclasses.

But why Kotlin and not java. Redpill me on ""numale languages"".

You misspelled LISP

Why not just use std::optional like a normal human being?

The people adding the features aren't looking at LISP, but Haskell for the features. But you are right it is definitely worth learning LISP too.

People need to understand languages are just syntaxes and you can make your own abstractions in them to do stuff you might not have thought was possible.

Gets rid of an assload of boilerplate associated with Java. Properties, data classes, singletons, no required semicolons, type inferencing, etc. Kotlin also prevents NPEs and has decent functional programming capabilities.

std::optional cannot hold my own Error type. If optional was enough then I'd have used it, but this is actually more like an Either type if anything.

Ruby and Elixir are the comfiest languages I've found yet.

>data classes and singletons are boilerplate now
Wew

>yes pls I want to write more repetitive code with 0 advantages in doing so
Worse than C-fags, at least C nets you performance.

>I trust pajeet in their universal, readily available shit for my specific problem
Zoinks

>singletons and data classes
>"specific problem"

Attached: 1310096653022.jpg (550x550, 127K)

Why not use std::variant then?

I do use that inside my Result type. But using it instead of Result wouldn't help me with my error handling anyway.
The way I am using it now unironically gives me the cleanest error handling possible. I only have to implement my messy template code in one place, and then I can use a sweet fluent-style syntax in the rest of my program.

Give Rust a shot. The only real complaint Jow Forums has with it is le SJWs REEEEE because they never learned how to be polite to people they don't like

c++ is nice
c# is nice
java is almost nice
javascript is very nice
php is depressing
prolog is orgasmic
lisp is meh

but python sucks dick is a shitty overrated language made for brainlets.

python is vomit.

functional weenies btfo

C++17 is literally a joy to write things in.

bloat

no u

Scala is pretty enjoyable. Lets you do a decent amount of FP without requiring you to be a walking encyclopedia of FP types, category theory and so on that Haskell [especially with 3rd party libs and larger projects] wants you to be.

Also, it is one of the strongest languages if you want to do parallel distributed computations; it has really good frameworks and databases and so on. Plus the most used build tools are great.

The newer versions of C++ also got more enjoyable. Language standard revisions and compilers -most importantly clang/llvm and g++- getting better helped quite a bit.

Attached: scala-spiral.png (304x492, 78K)

This. I never understood why Jow Forums doesn't talk about Scala. Is hard to learn sure, but it's good and it has more jobs than Crystal, Rust and Elixir.

Unironically go.

It's simple enough that you can keep the whole language in your head and just forget about it and focus on your actual problem instead of fighting with language quirks

I tried it and I didn't like it.

I'm a huge fan of minimalism, but even I have my limits. No generics is a deal breaker. Taking a dump in 20 years of Programming Language Research is another one. If I want something that compiles to native I would go to OCaml, or even SJW-Rust

That sounds pretty subjective, there was some stupid quirky shit in Go. Slices are pretty dumb, usable but dumb. Channels were crap iirc.

Been a while since I tried the pajeet lyfe. It isn't even awful, just felt more pythony than I wanted I think.

I actually liked channels, what I didn't like was having to write basic shit from scratch. In the beginning the was some sort of Stockholm Syndrome where I would say something like "Premature abstraction is the root of all evil", but when you can't create a basic set of complex structs, then it becomes a deal breaker.

you can fit most of rust in your head too, but learning rust gets you a much more powerful type system and no garbage collection

Most people can't fit any part of the borrow system in their head. Most cases it works transparently but it's not a simple concept. Generics, also a complex addition to language spec. Macros holy fuck you're not fitting the entire potential macro system anywhere.

In that case literally just use python
much bigger community, same premises

Nah, you need your langs to be compiled even if GC is involved.

I don't like languages without static typing.

Also I much prefer compiled languages. That said I use python for data science work out of necessity. It's alright but not something I get into the zone using

What is this write-only garbage. You might as well program in FORTH.

>you can fit most of rust in your head too
That's not possible because it's a moving target.