r/ProgrammingLanguages • u/baehyunsol Sodigy • Jul 29 '26
Purely functional language with impure script language?
I'm working on a purely functional programming language named Sodigy. It's all about evaluating values, not "executing commands one by one".
It's nice when writing libraries, but it's not easy to write a main function. The main function is supposed to execute commands, but the Sodigy's syntax is not friendly to write a list of commands.
So what I'm trying to do is, 1) Sodigy remains purely functional and 2) add a bash-like script language. The script language can call Sodigy functions. Instead of writing a main function in Sodigy, you write sodigy-script and execute the script.
Has anyone tried similar approach? I'm not sure whether it's a good idea or not...
View all comments
Show parent comment
4
u/tmzem Jul 29 '26
There is only a small amount of symbols available for operators so they all end up looking somewhat alike, making it hard to tell them apart.
But even without custom operators, the math-inspired culture in Haskell communities leads to code doesn't exactly lend itself to easy readability. Chosen identifiers are often very short and cryptic, and low-syntax features like partial application and function composition often tempt people to combine stuff on the fly rather then formulating the concept into its own, well-named function. Combine that with the frequent use of functions built against very abstract interfaces (e.g. Monad) - where the entire semantic meaning of its operations is dependent on the implementor type - and the meaning of the code becomes hard to figure out without type annotations which are often omitted because of type inference.
Of course I'm not much of an abstract thinker, so these difficulties may vary dependent on the person.