Remix.run Logo
Imustaskforhelp 19 hours ago

I just found it on a reddit post from r/programmerhumour and I found it to be actually decent after I mentioned someone nim in here on HN and they said that they don't like whitespace and I thought that they were fair and I actually looked at a nim processor that could do something like it but there were none.

https://www.reddit.com/r/ProgrammerHumor/comments/1np5g2t/th...

Here is the reddit post

Here is the HN person's comment https://news.ycombinator.com/item?id=45346840

Although, This isn't related to python, I actually went into Nim forum to see that they were using it because of their inspiration with python and so It was a bit funny / semi full circle seeing Python with braces.

Maybe we need to make Nim with braces as well :> I think that some people might genuinely like that. Its definitely a bit in my mind.

cb321 6 hours ago | parent [-]

Nim actually already supports using `()` as braces most of the time for most constructs. So, in this sense it is more like Haskell than Python, though the latter is more well known.

Nim is also more "expressional" than Python in many ways. So, for example, in Nim you can say:

    let x = (try: dict[key] except: 2)
    for i in 1..x: (
      echo i
    )
Most users hate how that looks, though, much as most users of bracist languages also hate:

    int foo(char bar) {
        int c = 0;
        for (char i = 0; i < bar; i++) c++;
        return c; } // could be many '}' here
In reality, these discussions feel more like style guide wars, reformatted as PLang syntax wars, pun intended.
Imustaskforhelp an hour ago | parent [-]

Wow tbh, I didn't know that you could do something like () in nim, I mean if somebody really really wants to use something similar to paranthesis, they sort of (could?) actually.

Like, as to that person who thought Nim to be a deal breaker because of whitespace, I think that this new information might help them to atleast try Nim!

Thanks, I learnt something new today thanks to ya!