Skip to content

Instantly share code, notes, and snippets.

@dfdgsdfg
Created December 29, 2022 13:46
Show Gist options
  • Save dfdgsdfg/73d836056233db530fcf85eb08e04a62 to your computer and use it in GitHub Desktop.
Save dfdgsdfg/73d836056233db530fcf85eb08e04a62 to your computer and use it in GitHub Desktop.

JS에 커링이 과연 얼마나 잘어울리냐하는 흥미로운 논의가 꽤 있었는데요,

대표적으로 포문을 연 Brian Lonsdorf 의 Hey Underscore, You're Doing It Wrong! 이 있죠. https://www.youtube.com/watch?v=m3svKOdZijA https://www.slideshare.net/drboolean/underscore-18211797

사실 로다쉬나 언더스코어/백본을 통해 막 함수형의 장점이 아카데믹이 아닌 커뮤니티에도 받아들여지고 있었는데 이때부터 커링이라든지, 람다JS나 Fantasy Land등 나름 함수형 고급 주제들이 실 개발자에게도 받아들이기 시작된거 같아요

아무튼, 실질적으로 좀더 살펴볼 거는 알렉스의 Currying is not idiomatic in JavaScript 인데, 커링의 대안으로 어차피 커링이 파셜 애플리케이션에서 쓸거니 bind(null, target)과 같이 bind를 응용하거나 bind(null, target)의 신타스틱 슈거를 만드는 방안등이 논의되긴 했지요. http://2ality.com/2017/11/currying-in-js.html

또 다른 함수형 라이브러리 Forktale도 커링을 버리고 대신 화살표함수를 쓰는 형태로 디자인 하는 방안을 선택했네요. http://folktale.origamitower.com/docs/v2.1.0/misc/design-principles/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment