Remix.run Logo
treyd 6 days ago

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

Imustaskforhelp 6 days ago | parent | next [-]

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.

samuell 3 days ago | parent | next [-]

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/
treyd 5 days ago | parent | prev [-]

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?

mihaic 6 days ago | parent | prev [-]

Keywords usually are quite pronounceable, and some of them are even proper words. How do you read fn?

nicoburns 6 days ago | parent | next [-]

Usually as "function"

steveklabnik 6 days ago | parent | prev | next [-]

fun

mastermage 6 days ago | parent | prev [-]

fn