Menu

Haskell Explained: Pure Functions, Serious Power
πŸ“°

Haskell Explained: Pure Functions, Serious Power

DEV Community: haskellΒ·The Practical DeveloperΒ·about 9 hours ago
#uIMHRdUG
#devtohaskell#devto#dev#type#haskell
Reading 0:00
15s threshold

Introduction

Most languages let functions do anything: change variables, print, read files, crash. Haskell, released in 1990, forbids most of that β€” and programmers who learn it often say it changed how they write every other language. It is a purely functional language: functions have no side effects, data never changes, and the type system catches whole classes of bugs before the program runs. It is less a tool for every job than a way of thinking that leaks, usefully, into everything else you write.

Purity, types, and laziness

Haskell's model rests on a few distinctive ideas:

Purity β€” a function, given the same inputs, always returns the same output and changes nothing.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.