Why is it so hard to create a good functional programming language? Literally every FP language I see has some weird quirks ...
Two main reasons:>Made by math autists for math autists, therefore it will be full of quirks for mentally abnormal people>Computers don't work in a functional way so when the math autist has to interact with tangible reality the language shits itself
>>107493023>Pick a language full of arbitrary restrictions>Still gets surprised when the language constantly make up new rules and restrictions?
>>107493023It's easier to just implement FP into a non-FP language. You avoid all of the FP purity audits by weirdos.
>>107493023FP means inmutability.
https://roc-lang.org/
>>107493023I'd love a simple, modern, compiled FP language similar to Go but with stuff like sum data types, functional methods, lambdas, higher order functions, monadic pattern matching.
>>107494937Someone created a typescript like transpiler that gives Go these things and then compiles to Go
this is the biggest issue that I have found with FP langs (not unique to Erlang btw):https://github.com/erlang/otp/issues/10450Clojure should be able to get around this (I think) by using Kryo.
F# is unironically great. Try it.+you get the whole c# and .net eco system for free, though then you often have to mix in some oop code that sticks out a bit.
>>107495038I heard that F# doesn't have modules and it is a pain to work with multiple files, is this true?
>>107495057Sorry, it does have modules, but they are annoying ...https://dev.to/klimcio/file-order-in-f-the-most-annoying-thing-for-a-beginner-38dc
this going to be 250 comments alive till sunday isnt?
>>107493023Lisp. Although it fell off with math autists because its too usable
>>107495635But which lisp? Common lisp's C interop is pretty terrible desu
Rust
>>107493023Why does /g/ always shills retards?>Luke Smith>Linus Race Mixing Tips>Xah Lee>Tsoding
>>107493023Tsoding can suck my big fat dick from the moon.
>>107493023>using a FFI for C>in haskellliterally, unironically, WHAT is the usecase
>>107497965are you retarded?you use a systems language to optimize hot loops and a high level language for everything else. same concept with Python + C/C++/Rust, or Elixir + C/Rust, or Java + JNI, or Lua + C, or whatever other pairing you use.
>>107498080LOLhttps://ocaml.org/docs/calling-c-libraries>OCaml doesn't quite let you call any C function yet. You need to write a little C wrapper around the library's function to translate to and from OCaml's internal types and C types
>>107498152go ahead and explain, in technical terms, why that problem is so easily solved such that laughing about it is a reasonable reaction
>>107493462fpbp\thread
>>107493462>Computers don't work in a functional waylmao, you cannot be serious