5 ms·
> Nimrod's syntax is quite similar to scala What are you talking about!? Have you even looked at either? Nimrod: for i in 1..100: if i mod 15 ==
by joehillen 13y ago
> Nimrod's syntax is quite similar to scala
What are you talking about!? Have you even looked at either?
Nimrod:
for i in 1..100:
if i mod 15 == 0:
echo("FizzBuzz")
elif i mod 3 == 0:
echo("Fizz")
elif i mod 5 == 0:
echo("Buzz")
else:
echo(i)
Scala:
for (x <- 1 to 100) println(
(x % 3, x % 5) match {
case (0, 0) => "FizzBuzz"
case (0, _) => "Fizz"
case (_, 0) => "Buzz"
case _ => x
})
In nimrod you'll notice a lot less parens, curly braces, and '=>'.
> fast Haskell and easy/safe Haskell tend not to overlap as much as one would like
Not even remotely true. Where did you even get that idea?
- dom96 13y agoIt really depends on what part of Nimrod and Scala you look at. The similarities are perhaps more apparent when looking at the function declaration syntax, generics and/or the variable declaration syntax.