Jump to content
Faab234

Functional

Recommended Posts

Scripting language written in Javascript.

[URL="https://github.com/FabianM/functional"]https://github.com/FabianM/functional[/URL]

[PHP]##
# Hello world in Functional!
##
print("Hello world")[/PHP]
[PHP]##
# Variables in Functional.
##
set("myvar", "String")
print(myvar)[/PHP] Edited by Faab234

Share this post


Link to post
Share on other sites
Is this a different programming language or...?

Share this post


Link to post
Share on other sites
[quote name='Hash']Is this a different programming language or...?[/QUOTE]

It's a scripting language wrote in Javascript.

Share this post


Link to post
Share on other sites
[quote name='Hash']Is this a different programming language or...?[/QUOTE]

Yes, this is a functional-based scripting language. It supports function-calls, barewords and code-blocks.

Share this post


Link to post
Share on other sites
what a poor name, it's almost as if it's meant to mislead people into believing this is a functional programming language. ps there's no such thing as a 'Functional-based' programming language, if you did mean a language supporting usage of the functional paradigm then i suggest you learn a functional language first and then attempt to mimic it rather than failing almost immediately by creating something that stinks of imperativeness.

i suggest making sequential execution explicit with something like Haskell's [i]do[/i] notation and prefer using composition and application where it suffices, and get rid of that ugly [i]set[/i] function, add a syntax for binding (let myvar = "String") instead. encapsulation/explicit-declaration of state mutation should be present too.

edit: in fact, this looks more like a syntax sugared javascript than anything else. lol'd at
[code]set("foo", function({
print("Example function")
}))
foo()[/code]

i don't know how you're going to flex this syntax to allow arguments unless you go for something like Perl's ugly solution of a global array Edited by reanimated s1gma

Share this post


Link to post
Share on other sites
[quote name='reanimated s1gma']what a poor name, it's almost as if it's meant to mislead people into believing this is a functional programming language. ps there's no such thing as a 'Functional-based' programming language, if you did mean a language supporting usage of the functional paradigm then i suggest you learn a functional language first and then attempt to mimic it rather than failing almost immediately by creating something that stinks of imperativeness.

i suggest making sequential execution explicit with something like Haskell's [i]do[/i] notation and prefer using composition and application where it suffices, and get rid of that ugly [i]set[/i] function, add a syntax for binding (let myvar = "String") instead. encapsulation/explicit-declaration of state mutation should be present too.

edit: in fact, this looks more like a syntax sugared javascript than anything else. lol'd at
[code]set("foo", function({
print("Example function")
}))
foo()[/code]

i don't know how you're going to flex this syntax to allow arguments unless you go for something like Perl's ugly solution of a global array[/QUOTE]

[URL="http://esolangs.org/wiki/Functional"]http://esolangs.org/wiki/Functional[/URL]

This language is meant to be a joke. ;)

Share this post


Link to post
Share on other sites
[quote name='Faab234']This language is meant to be a joke. ;)[/QUOTE]
esoteric languages should be funny and strange, that language is neither and the lack of explaining that you were implementing a language rather than creating your own was disturbing. how about stop wasting your time on something that sucks and implement some of my suggestions, for your own education.

edit: a language very similar to this that doesn't work on the gimmicky esoteric idea is Io ([url]http://iolanguage.com/[/url]). i suggest attempting to implement this language instead, it's much cooler. Edited by reanimated s1gma

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×