The Broccoli Programming Language
earthvssoup.com
earthvssoup.com
My curiosity was piqued so I went to your site and found a bit on how to do broccoli, but no links or text jumped out at me as to why to do broccoli. Is it just a novelty, or does it scratch some itch that other languages don't address?
I personally have a difficult time wrapping my head around ideas like, functional, and closures, and lambda, in the abstract, so this is my way (not there yet BTW) of really wrapping my head around these ideas.
What's special about Broccoli?
I happen to like them, particularly for interpolation in strings...and strings are so much of what we do with web applications. "There are $number posts" is much more pleasant, to me, than "There are " . number . " posts". But I might be weird, and there does seem to be an aversion to them in most recent languages that have achieved popularity.
2) I like to see, at a glance, what a variable "is doing". In Broccoli, there are only two "doings" hold values, or holding a collection of values.
3) I know I said 2, but the real reason.... it is easier to parse. ;)
-m
This is a lisp-like language whose principal purpose is to help the creator of the language thoroughly understand how programming languages (especially lisp-like programming languages) work.
To elaborate, does it allow for niftiness that I couldn't do with a solid scheme or haskell environment, or does it beat out python or perl for quick scripting in some domain?
(fn map ($func @lst)
(if (= @lst (list))
(list)
else
(cat (call $func (first @lst))
(map $func (rest @lst))
)
)
) (fn filter ($func @lst)
(:= @ret (list))
(for $e in @lst
(if (call $func $e)
(:= @ret (cat $e @ret))
)
)
@ret
)