← Back to context

Comment by treyd

5 days ago

What's wrong with fn? It's perfectly understandable. I don't understand what the bikeshedding about keywords like this is about.

I don't even code in kotlin but I know that kotlin has function as fun :P

Such small things as using __ __ in python and small inconveniences (lua's 1 instead of 0) really has a lot of people, what do I say.. yea, polarized on this matter.

  • fun is the best, as it makes the function name align with the code block indented 4 characters :D

        fun main() {
            println("Hello, world!")
        }
            ^ aligned here! \o/

  • 0 vs 1 indexing has an actual semantic difference that you have to keep in your head at ~all times, but could have a text editor plugin that rewrites func<->fn since it's purely syntactical.

    What is inconvenient about it?