# PureScript

> strongly typed language that compiles to JavaScript

**Wikidata**: [Q65082796](https://www.wikidata.org/wiki/Q65082796)  
**Wikipedia**: [English](https://en.wikipedia.org/wiki/PureScript)  
**Source**: https://4ort.xyz/entity/purescript

## Summary
PureScript is a strongly typed, purely functional programming language that compiles to JavaScript, designed to improve reliability and interoperability in JavaScript-based development. It emphasizes rigorous type checking and functional programming principles to help developers write maintainable code. First released in 2014, it combines the safety of static types with the flexibility of the JavaScript ecosystem.

## Key Facts
- **Inception**: 2013.
- **License**: 3-clause BSD License.
- **Typing Discipline**: Strong typing, static typing, inference typing, and row polymorphism.
- **Programming Paradigm**: Purely functional programming, with syntax and semantics influenced by Haskell.
- **Compilation Target**: Compiles directly to JavaScript for web and Node.js environments.
- **Initial Release**: Version 0.5.0 on April 27, 2014.
- **Repository**: Hosted on GitHub at [https://github.com/purescript/purescript](https://github.com/purescript/purescript).
- **Website**: [https://www.purescript.org/](https://www.purescript.org/) (in English).

## FAQs
### Q: What is PureScript used for?
A: PureScript is used for developing robust, maintainable applications that run in JavaScript environments, such as web browsers or Node.js, leveraging strong types and functional programming to reduce runtime errors.

### Q: How does PureScript differ from Haskell?
A: While PureScript’s syntax and core concepts are inspired by Haskell, it is specifically designed to compile to JavaScript and integrates seamlessly with JavaScript libraries and tools, unlike Haskell, which targets native code or other backends.

### Q: Is PureScript open source?
A: Yes, PureScript is released under the 3-clause BSD License, and its source code is publicly available on GitHub.

## Why It Matters
PureScript addresses the challenges of dynamic typing in JavaScript by introducing a strong, static type system that catches errors at compile time rather than runtime. Its functional programming model encourages a declarative coding style, which can simplify complex applications and improve code reuse. By compiling to JavaScript, PureScript enables developers to leverage existing JavaScript ecosystems and tools while benefiting from advanced type safety and rigorous mathematical foundations. This balance of safety and practicality makes PureScript a valuable tool for building scalable and reliable software in web and enterprise environments.

## Notable For
- **Strong Static Typing**: Enforces type safety at compile time, preventing common JavaScript runtime errors.
- **Row Polymorphism**: Offers flexible type inference for objects and records, enhancing code expressiveness.
- **Haskell-Inspired Syntax**: Provides a familiar environment for Haskell developers while optimizing for JavaScript interoperability.
- **Seamless JavaScript Integration**: Allows direct use of JavaScript libraries and seamless code interop.

## Body
### History
- **Inception**: PureScript was first conceived in 2013.
- **First Release**: Version 0.5.0 was released on April 27, 2014, followed by rapid iterative updates, including versions 0.5.4 (August 4, 2014) and 0.6.0 (November 6, 2014).

### Key Features
- **Type System**: Combines strong, static typing with inference, ensuring type safety without excessive verbosity.
- **Functional Programming**: Emphasizes immutability, recursion, and higher-order functions, aligning with purely functional principles.
- **Compilation**: Translates to idiomatic JavaScript, enabling use in both browser and server-side contexts.

### Technical Specifications
- **Typing Disciplines**: Static typing, strong typing, inference typing, and row polymorphism.
- **Paradigms**: Purely functional programming, with support for algebraic data types and type classes.
- **Interoperability**: Supports bidirectional integration with JavaScript via foreign function interfaces (FFIs).

### Influences
- **Haskell**: PureScript’s syntax and type system draw heavily from Haskell, as documented in its GitHub repository. However, it diverges in design choices tailored for JavaScript environments.

## References

1. [Release 0.5.0. 2014](https://github.com/purescript/purescript/releases/tag/v0.5.0)
2. [Release 0.5.4. 2014](https://github.com/purescript/purescript/releases/tag/v0.5.4)
3. [Release 0.5.5. 2014](https://github.com/purescript/purescript/releases/tag/v0.5.5)
4. [Release 0.5.6. 2014](https://github.com/purescript/purescript/releases/tag/0.5.6)
5. [Release 0.5.6.1. 2014](https://github.com/purescript/purescript/releases/tag/0.5.6.1)
6. [Release 0.5.6.2. 2014](https://github.com/purescript/purescript/releases/tag/0.5.6.2)
7. [Release 0.5.6.3. 2014](https://github.com/purescript/purescript/releases/tag/v0.5.6.3)
8. [Release 0.5.7. 2014](https://github.com/purescript/purescript/releases/tag/v0.5.7)
9. [Release 0.5.7.1. 2014](https://github.com/purescript/purescript/releases/tag/v0.5.7.1)
10. [Release 0.6.0. 2014](https://github.com/purescript/purescript/releases/tag/v0.6.0)
11. [Release 0.6.0.2. 2014](https://github.com/purescript/purescript/releases/tag/v0.6.0.2)
12. [Release 0.6.1. 2014](https://github.com/purescript/purescript/releases/tag/v0.6.1)
13. [Release 0.6.1.1. 2014](https://github.com/purescript/purescript/releases/tag/v0.6.1.1)
14. [Release 0.6.1.2. 2014](https://github.com/purescript/purescript/releases/tag/v0.6.1.2)
15. [Release 0.6.2. 2014](https://github.com/purescript/purescript/releases/tag/v0.6.2)
16. [Release 0.6.3. 2015](https://github.com/purescript/purescript/releases/tag/v0.6.3)
17. [Release 0.6.4. 2015](https://github.com/purescript/purescript/releases/tag/v0.6.4)
18. [Release 0.6.4.1. 2015](https://github.com/purescript/purescript/releases/tag/v0.6.4.1)
19. [Release 0.6.5. 2015](https://github.com/purescript/purescript/releases/tag/v0.6.5)
20. [Release 0.6.6. 2015](https://github.com/purescript/purescript/releases/tag/v0.6.6)
21. [Release 0.6.7. 2015](https://github.com/purescript/purescript/releases/tag/v0.6.7)
22. [Release 0.6.7.1. 2015](https://github.com/purescript/purescript/releases/tag/v0.6.7.1)
23. [Release 0.6.8. 2015](https://github.com/purescript/purescript/releases/tag/v0.6.8)
24. [Release 0.6.9.3. 2015](https://github.com/purescript/purescript/releases/tag/v0.6.9.3)
25. [Release 0.6.9.5. 2015](https://github.com/purescript/purescript/releases/tag/v0.6.9.5)
26. [Release 0.7.0. 2015](https://github.com/purescript/purescript/releases/tag/v0.7.0)
27. [Release 0.7.1. 2015](https://github.com/purescript/purescript/releases/tag/v0.7.1)
28. [Release 0.7.2. 2015](https://github.com/purescript/purescript/releases/tag/v0.7.2)
29. [Release 0.7.2.1. 2015](https://github.com/purescript/purescript/releases/tag/v0.7.2.1)
30. [Release 0.7.3. 2015](https://github.com/purescript/purescript/releases/tag/v0.7.3)
31. [Release 0.7.4.1. 2015](https://github.com/purescript/purescript/releases/tag/v0.7.4.1)
32. [Release 0.7.5. 2015](https://github.com/purescript/purescript/releases/tag/v0.7.5)
33. [Release 0.7.5.1. 2015](https://github.com/purescript/purescript/releases/tag/v0.7.5.1)
34. [Release 0.7.5.2. 2015](https://github.com/purescript/purescript/releases/tag/v0.7.5.2)
35. [Release 0.7.5.3. 2015](https://github.com/purescript/purescript/releases/tag/v0.7.5.3)
36. [Release 0.7.6. 2015](https://github.com/purescript/purescript/releases/tag/v0.7.6)
37. [Release 0.7.6.1. 2015](https://github.com/purescript/purescript/releases/tag/v0.7.6.1)
38. [Release 0.8.0. 2016](https://github.com/purescript/purescript/releases/tag/v0.8.0)
39. [Release 0.8.1. 2016](https://github.com/purescript/purescript/releases/tag/v0.8.1)
40. [Release 0.8.2. 2016](https://github.com/purescript/purescript/releases/tag/v0.8.2)
41. [Release 0.8.3. 2016](https://github.com/purescript/purescript/releases/tag/v0.8.3)
42. [Release 0.8.4. 2016](https://github.com/purescript/purescript/releases/tag/v0.8.4)
43. [Release 0.8.5. 2016](https://github.com/purescript/purescript/releases/tag/v0.8.5)
44. [Release 0.9.1. 2016](https://github.com/purescript/purescript/releases/tag/v0.9.1)
45. [Release 0.9.2. 2016](https://github.com/purescript/purescript/releases/tag/v0.9.2)
46. [Release 0.9.3. 2016](https://github.com/purescript/purescript/releases/tag/v0.9.3)
47. [Release 0.10.1. 2016](https://github.com/purescript/purescript/releases/tag/v0.10.1)
48. [Release 0.10.2. 2016](https://github.com/purescript/purescript/releases/tag/v0.10.2)
49. [Release 0.10.3. 2016](https://github.com/purescript/purescript/releases/tag/v0.10.3)
50. [Release 0.10.4. 2017](https://github.com/purescript/purescript/releases/tag/v0.10.4)