Hacker News new | past | comments | ask | show | jobs | submit login

> If the function can work with what it was given, it should

How do you know that it "can work" based purely on the name of the function?

> But be pragmatic

I am. I consider javascript a last-resort option, only really useful for adding minor enhancements client side. Beyond that, I don't use it.




Documentation and/or a type checker. Jsdocs are both documentation for programmers and can be enforced using tooling like the closure compiler or typescript

JavaScript is no different from most other dynamic languages this way


So, 'hope'.

This is exactly why I can't take javascript seriously for anything besides basic UI enhancements to a web page.


I’m sorry that I commented on this article. Knew it was a trap. I’ve been writing functional-style for a long time and just wanted to share a bit of what I’ve learned.

Use whatever tools work for you, but also don’t disparage or dismiss other tools because they have different strengths and weaknesses than what you know or appreciate. There is no need for proselytizing; these are just tools after all!

I like JavaScript and TypeScript because they have let me quickly build many great things and share them with people. I also subjectivity find writing in them to be enjoyable. I may always turn to a different language if it is more productive and enjoyable than js/ts for the task at hand.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: