Haskell: различия между версиями

Содержимое удалено Содержимое добавлено
Нет описания правки
Нет описания правки
Строка 11:
 
Haskell уникален по двум причинам. Во-первых, он это ''чистый'' функциональный язык. Если у вас есть функция и вы вызываете её в двух
разных местах с одинаковыми аргументами, то вы гарантированно получите одинаковые результаты в обоих случаях. Во-вторых, Haskell обеспечивает самую современную систему типов, включая такие возможности как классы типов и GADT. We don't expect you to know what these terms mean for now, but we do hope they'll be rolling smoothly off your tongue by the time you are done with this book. So, why do Haskellers like the language then? Is it just because we like using things that are unique and modern? No, Haskell programmers enjoy their work because dealing with just pure functions makes it so much easier to understand our programs and prove them correct. Moreover, having an advanced type system helps us catch our mistakes, both the silly and profound ones.
Secondly, Haskell provides a very modern type system which incorporates features like typeclasses and generalized algebraic data types. We don't expect you to know what these terms mean for now, but we do hope they'll be rolling smoothly off your tongue by the time you are done with this book. So, why do Haskellers like the language then? Is it just because we like using things that are unique and modern? No, Haskell programmers enjoy their work because dealing with just pure functions makes it so much easier to understand our programs and prove them correct. Moreover, having an advanced type system helps us catch our mistakes, both the silly and profound ones.
 
In this book we aim to introduce you both to the Haskell language, from the very basics to its most advanced features, and to computer programming in general. Seasoned programmers, we urge you to be especially patient with this process. In all likelihood, the languages you are most familiar with differ greatly from Haskell, and habits from those languages might make it more difficult to understand how things work: simple, but different. So treat this as an adventure, a whole different world, seeing programming through the warped and mathematical mindset of a functional programmer.