Javascript是一种功能语言 [英] Javascript as a functional language
问题描述
我已经在web应用程序中使用Javascript进行客户端脚本多年,除了使用原型之外是所有简单的DOM操作,输入验证等。
最近,我有经常阅读,Javascript是支持函数式编程的语言之一。
凭借我对Javascript的熟悉和经验,我的首选是使用它学习函数式编程。我希望我能够更专注于主要的功能概念,而不会被一种全新的语法陷入困境或分心。
因此,总而言之,Javascript是一件好事学习函数式编程概念的选择? JavaScript中的哪些功能与相关/支持函数式编程有关?JavaScript支持头等功能。请参阅 使用函数式编程技术编写优雅的JavaScript 。I am looking get to grips with functional programming concepts.
I've used Javascript for many years for client side scripting in web applications and apart from using prototypes it was all simple DOM manipulation, input validation etc.
Of late, I have often read that Javascript is one of the languages that supports functional programming.
With my familiarity and experience with Javascript, my preference is to use it to learn functional programming. I expect I would be able to concentrate more on the main functional concepts and not get bogged down or distracted by a completely new syntax.
So in summary, is Javascript a good choice to learn functional programming concepts? What capabilities in Javascript are relevant/support functional programming?
JavaScript supports first class functions. See Use functional programming techniques to write elegant JavaScript.
这篇关于Javascript是一种功能语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!