
۴۴٬۰۰۰تومان
نوع فایل دانلود: EPUB
پس از خرید، یک فایل EPUB دریافت میکنید.
این فایل با Calibre، Apple Books و سایر کتابخوانهای دیجیتال مناسب است.
بسیاری از زبانها الگوهای برنامهنویسی تابعی را پذیرفتهاند تا ابزارهای بیشتری برای حل مسئله در اختیار برنامهنویسان بگذارند. این رویکرد کمک میکند کدی بنویسید که فهمش آسانتر است، آزمایشش سادهتر است و میتواند از پردازش موازی بهره ببرد؛ برای همین برای ساخت راهحلهای مدرن و مقیاسپذیر گزینهٔ خوبی است.
پیاچپی در نسخهٔ ۵.۳ توابع ناشناس و کلوزرها را معرفی کرد و راه کوتاهتری برای حل مسائل رایج فراهم آورد. نسخههای تازهتر هم ژنراتورها و آرگومانهای متغیر را اضافه کردهاند که به نوشتن کد تابعیِ کوتاهتر کمک میکنند. با این حال، عبور ذهنی از سبک رایج دستوری به برنامهنویسی تابعی نیازمند درک این است که کی و چگونه از لامبداها، کلوزرها، بازگشت و موارد مشابه به بهترین شکل استفاده کنید. همچنین باید یاد بگیرید دادهها را به شکل مجموعههایی ببینید که میتوان آنها را نگاشت، کاهش، تخت و فیلتر کرد.
کتاب برنامهنویسی تابعی در پیاچپی نشان میدهد چطور با فهم اصول برنامهنویسی تابعی از این قابلیتهای تازهٔ زبان بهره بگیرید. این ویرایش دوم بیش از دو برابر نسخهٔ قبلی محتوا دارد و با نمونههای کد بهروز و پوشش پیشرفتهای پیاچپی ۷ و هک، آن را گسترش میدهد. در هر فصل نمونههای فراوانی آمده تا هر مفهوم را هنگام معرفی روشن کند و نشان دهد چطور آن را با پیاچپی پیاده کنید. یاد میگیرید از نگاشت/کاهش، کاریینگ، ترکیب و موارد دیگر استفاده کنید. همچنین میبینید چه کتابخانههای بیرونی در دسترساند و چه قابلیتهای زبانی تازهای پیشنهاد شدهاند تا توان برنامهنویسی تابعی پیاچپی را گسترش دهند.
Many languages have embraced Functional Programming paradigms to augment the tools available for programmers to solve problems. It facilitates writing code that is easier to understand, easier to test, and able to take advantage of parallelization making it a good fit for building modern, scalable solutions. PHP introduced anonymous function and closures in 5.3, providing a more succinct way to tackle common problems. More recent releases have added generators and variadics which can help write more concise, functional code. However, making the mental leap from programming in the more common imperative style requires understanding how and when to best use lambdas, closures, recursion, and more. It also requires learning to think of data in terms of collections that can be mapped, reduced, flattened, and filtered. Functional Programming in PHP will show you how to leverage these new language features by understanding functional programming principles. With over twice as much content as its predecessor, this second edition expands upon its predecessor with updated code examples and coverage of advances in PHP 7 and Hack. Plenty of examples are provided in each chapter to illustrate each concept as it's introduced and to show how to implement it with PHP. You'll learn how to use map/reduce, currying, composition, and more. You'll see what external libraries are available and new language features are proposed to extend PHP's functional programming capabilities.