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

Материал из Викиучебника — открытых книг для открытого мира
Содержимое удалено Содержимое добавлено
Нет описания правки
Нет описания правки
Строка 11: Строка 11:


Haskell уникален по двум причинам. Во-первых, он это ''чистый'' функциональный язык. Если у вас есть функция и вы вызываете её в двух
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.
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.

Версия от 17:02, 22 ноября 2007



Вступление

На этой странице представлен перевод большинства разделов из Haskell WikiBook. Оригинал можно найти здесь.

Haskell :: Функциональное программирование с типами

Haskell - функциональный язык программирования. Если вы уже программировали на чём-либо и хотите посмотреть как Haskell работает и его отличия от других языков, вы можете прочитать краткий обзор.

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.

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.

Overview

The book is divided into three sections, namely, the Beginner's Track, the Advanced Track, and Practical Haskell. The last is designed to cover the more day-to-day issues, and to be readable with simply the knowledge of the Beginner's Track.

Please contribute! Everyone, regardless of Haskell competency, can help out. Spend five minutes improving a module and save someone else hours of time. Check out the notes for contributors.

Для начинающих

Основы

Начальный уровень

Средний уровень

Монады

Для продолжающих

Более глубокое изучение

Развлекаемся с типами

Теория

Производительность