Hacker News new | ask | show | jobs
by bollix 4218 days ago
Renaming 'function' to 'fn'?

So much of this is down to fashion. Are programmers really bound by their typing speed? No.

The only real thing that matters with a language is "can I run this on hardware X", and "How fast does it run / how much memory". Syntax is utterly irrelevant (Unless you're into fashion).

Lisp is just basic with a different syntax...

5 comments

For me, it's not really about the amount of typing I have to do. In my opinion, function is so annoying because it takes up way more horizontal space on the screen than it needs to, especially if you get a number of them together.
I think "horizontal spam" is a helpful designation for this particular problem.
I don't know if it's fashion, really. A lot of web developers aren't using IDEs like WebStorm, so they're missing out on autocomplete for a lot basic tokens, like "function".

I know when I started working on Angular apps after living in my Xcode bubble for so long, the first item on my list was to find a good IDE for web development. Sublime is good, but it's not that good. I don't type very much, I hit Tab key.

It's not just fashion or typing speed- syntax affects how readable code is. Common tokens that don't have a lot of meaning intrinsic to the program being written should be smaller or you get mired in bureaucracy when trying to read it.

Which of the following is clearer?

    plus(new vector(5, 3), scale(3, new vector(7, 3)))

    new vector(5, 3).plus(new vector(7, 3).scale(3))

    <5, 3> + 3 * <7, 3>
Probably the second one, but they all look basically the same to me. Perhaps programmers should get better at reading code.

The last one is least readable IMHO. It's like a regexp. It's the most ambiguous and has the most potential for errors also.

It's hard to typo "function" and have a program still compile/run. It's a lot easier to typo "fn" and still have the program compile/run. Smaller tokens mean more potential errors.

So do you bother with assembly or just go with straight binary?
assembly -> binary is an encoding not a syntax.

That's like asking an author if he writes using the alphabet or ascii.

Programming language debates are like asking Charles Dickens why he wrote in English rather than Russian. Would his books have been any different in Russian? No - it's irrelevant.

Language in literature is certainly not irrelevant.

Any translator (or even bilingual person) will tell you that some concepts are very hard to translate, because the target language was shaped by a different culture.

And in scientific and other non-fictions texts - which are closer to programs than literature - this was doubly so, as the number of important scientists and philosophers writing in non-native languages shows.

I'm with you. My favorite language is Blub.