FizzBuzz in FreezeFlame This is the first question for this language, and I decided I would do a FizzBuzz.

I used a template literal as a proof of concept, same goes for the pipe (|&gt;). The code creates a function that recreates the traditional FizzBuzz in FreezeFlame:

var fizzBuzz = (max) -&gt; {
    for(var i = 0; i &lt; max + 1; i++) {
        (if i % 3 === 0 || i % 5 === 0 then "#{i % 3 == 0 ? 'Fizz' : ''}#{i % 5 === 0 ? 'Buzz' : ''}" else i) |&gt; console.log
    }
}


This is equivalent to the following in JavaScript:

var fizzBuzz = (max) =&gt; {
    for(var i = 0; i &lt; max + 1; i++){
        console.log((i % 3===0||i % 5===0 ? `${i % 3 == 0 ? 'Fizz' : ''}${i % 5 === 0 ? 'Buzz' : ''}` : i));
    };
}


The following features are used:


FreezeFlame ternary (if ... then ... else ...)
FreezeFlame template literals (#{...})
JS ternary (... ? ... : ...)
FreezeFlame pipe (... |&gt; ...)
FreezeFlame function ((...) -&gt;  { ... })


My main worries are the testing.

FreezeFlame GitHub
DRY

I'm sorry to say this but this solution is needlessly complicated. You are doubling up on your divisibility checks. This is a well known interview question where the goal is to really just to check that you can order your if statements correctly. It is kind of cool that you never really do a i % 3 == 0 &amp;&amp; i % == 5 check (or i % 15 == 0), but at what cost?

What is the purpose of this language? Is FizzBuzz really suppose to show off the language?

I hate to sound this harsh, but I am not really feeling this language. Is it probably a useful educational experience? Sure, but I:


Don't think this example really showcases anything about your language, except for maybe the pipe operator.
(Maybe better for your other question) Not sure about the goal of the language.
I feel like most of the stuff (maybe not all, but most) could be simulated with macros. Hence, instead of creating a whole new language, you could use something like SweetJS to emulate most of the stuff you have done.
Not really sure how template literals showcase anything about your language, Javascript does it nearly identical to your way.


I know this is discouraging. I remember someone saying something along the lines of getting the urge to make a programming language and then laying down for a while until the urge wears off.

Before I become too discouraging, however, maybe you should really think about code you disliked in Javascript and analyze it closely. Then write it the way you want it to look like and then consider what you want. Maybe if you want to use template literals so badly, you can find a way to describe them easier in FreezeFlame?