Are there any functional programming languages designed for code-golfing?

14

Are there any functional programming languages designed for code golfing? I know that golfscript and CJam fulfill the same category for stack based, but I couldn't find a functional code golfing language.

PyRulez

Posted 2017-06-02T19:34:25.160

Reputation: 6 547

Define "functional programming languages". – MD XF – 2017-06-02T19:34:52.023

Do you mean something like Haskell? – Beta Decay – 2017-06-02T19:36:16.680

There's Clip by Ypnypn and Leo and Zgarb are currently designing and implementing a Haskell-based golfing language called Husk.

– Martin Ender – 2017-06-02T19:36:59.673

If C qualifies as a functional language, I wrote shortC.

– MD XF – 2017-06-02T19:38:41.370

6

I'm voting to close this question as off-topic because it has an answer on the meta site: https://codegolf.meta.stackexchange.com/questions/6918/what-programming-languages-have-been-created-by-ppcg-users

– mbomb007 – 2017-06-02T19:39:33.410

3@mbomb007 Except that it's limited to languages created by PPCG users... (and contains neither Clip nor Husk but has several languages claiming they're functional although they aren't). – Martin Ender – 2017-06-02T19:52:05.943

1Burlesque isn't entirely functional, but it does have one of the trademark features of functional programming languages, namely lazy lists. – Martin Ender – 2017-06-02T19:52:53.637

1Jelly is tacit, and tacit implies functional, doesn't it? – Luis Mendo – 2017-06-02T20:12:41.267

2

@MDXF I am assuming the definition of a functional language to be one that primarily uses the functional programming paradigm. Although C has functions, it is typically considered to be a procedural programming language.

– musicman523 – 2017-06-02T20:41:59.193

@BetaDecay Shouldn't this be on the meta site, though? The question is at least similar to the one I linked, and fits more on meta, I'd think. – mbomb007 – 2017-06-02T21:14:17.917

4@mbomb007 It's not a question about PPCG so it definitely doesn't belong on meta. Whether it belongs on main is arguable, but since we allow other kinds of non-challenge questions about golfing in general (including golfing tips, questions about golfing language design and questions about challenge writing) I don't think this is a bad fit for main. – Martin Ender – 2017-06-02T21:17:10.153

1@mbomb007 No, this is effectively a tips question which are most definitely on topic on main – Beta Decay – 2017-06-02T21:42:24.360

What are functional programming languages? Pure BF isn't a golfing language, but you could do the same thing to some other languages.

– jimmy23013 – 2017-06-03T07:41:37.653

2

@MDXF The C language is purely functional

– cat – 2017-06-03T10:34:59.300

Would Jelly count as functional? – lirtosiast – 2017-07-14T21:27:28.987

@mbomb007 Having an answer on meta doesn't make it off-topic. – PyRulez – 2017-07-16T19:48:47.420

@MartinEnder It's not just lists that are lazy, the language itself has lazy evaluation as for example noticeable when writing code like 1R@<-L[vv1. Of course, this property is barely of any use in real code as it's mostly only useful for lists but the language itself is lazy. 1R@<-L[ (eval) would inverse an infinite list and calculate it's length which would never terminate but vv pops an element from the stack so the result of that computation is never needed and thus it's never actually evaluated.

– mroman – 2017-08-07T09:21:37.140

Answers

11

Husk

Husk is a pure functional golfing language created by me and Leo and inspired by Haskell. It combines a rigid type system, type inference and extensive overloading. Functions are first class values and can be manipulated as easily as other data. Development of Husk is ongoing and many features are still missing, but you can try it out at TIO. We also have a SE chatroom for the language.

Zgarb

Posted 2017-06-02T19:34:25.160

Reputation: 39 083

0

Pyth

Pyth is a functional language that transpiles to python

Tornado547

Posted 2017-06-02T19:34:25.160

Reputation: 389