awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目MCP 服务器关于排名机制媒体报道
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
evhub avatar

evhub/coconut

0
View on GitHub↗
4,338 星标·143 分支·Python·Apache-2.0·10 次浏览coconut-lang.org↗

Coconut

Coconut 是一种编译为 Python 的函数式编程语言。它作为一个源到源编译器,将高级函数式语法转换为兼容的 Python 代码,以保持运行时兼容性。

该语言引入了一种用于模式匹配和解构复杂数据结构的逻辑系统。它提供了一种尾调用优化机制,以防止深度递归函数调用期间的栈溢出错误,并采用惰性求值引擎来推迟计算,直到明确需要结果为止。

该项目包括对代数数据类型、管道运算符和部分应用的支持。它还提供了一个通过跨多个 CPU 核心分发映射操作来进行并行数据处理的框架。

Features

  • Functional-to-Python Transpilation - Functions as a source-to-source compiler that translates functional syntax into executable Python code.
  • Algebraic Data Types - Allows the definition of algebraic data types to model complex values through tagged unions and variants.
  • Lazy Evaluation - Implements a lazy evaluation engine to defer computation until results are explicitly required.
  • Functional Programming Languages - Provides a full functional programming language that compiles to Python with integrated pattern matching and lazy evaluation.
  • Python Functional Programming Libraries - Brings functional programming primitives like piping and partial application to the Python environment.
  • Pattern Matching - Offers enhanced destructuring and pattern-matching logic for branching based on data structure shapes.
  • Pattern Matching - Features a logic system for destructuring complex data structures using structural pattern matching.
  • Functional Pipeline Composition - Provides pipeline operators to chain multiple functions together for sequential data flow.
  • Source-to-Source Compilers - Translates high-level functional syntax into Python source code to maintain runtime compatibility.
  • Tail-Call Optimizations - Implements a mechanism for tail call optimization to prevent stack overflow errors during deep recursive function calls.
  • Functional Programming - Provides built-in syntactical support for lambdas, pipeline programming, and partial application.
  • Stack-Safe Recursion - Optimizes recursive function calls to prevent stack overflow errors during deep recursion.
  • Parallel Processing - Distributes mapping operations across multiple CPU cores to accelerate processing of large datasets.
  • Multi-Core Workload Distribution - Provides a framework to split mapping operations across multiple CPU cores for parallel data processing.
  • Parallel Processing - Improves computational performance by distributing mapping tasks across multiple CPU cores.
  • Functional Programming - Adds functional programming features to Python syntax.

Star 历史

evhub/coconut 的 Star 历史图表evhub/coconut 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

常见问题解答

evhub/coconut 是做什么的?

Coconut 是一种编译为 Python 的函数式编程语言。它作为一个源到源编译器,将高级函数式语法转换为兼容的 Python 代码,以保持运行时兼容性。

evhub/coconut 的主要功能有哪些?

evhub/coconut 的主要功能包括:Functional-to-Python Transpilation, Algebraic Data Types, Lazy Evaluation, Functional Programming Languages, Python Functional Programming Libraries, Pattern Matching, Functional Pipeline Composition, Source-to-Source Compilers。

evhub/coconut 有哪些开源替代品?

evhub/coconut 的开源替代品包括: dry-python/returns — Returns is a functional programming library for Python that provides type-safe containers for managing state, error… reasonml/reason — Reason is a strongly typed functional language and multi-target compiler designed to produce either JavaScript for web… elm/compiler — This project is a functional programming compiler and JavaScript transpiler that transforms a statically typed… purescript/purescript — PureScript is a statically typed, purely functional programming language that compiles to JavaScript. It is designed… pytoolz/toolz — Toolz is a Python library that implements functional programming utilities for iterable transformation, dictionary… vavr-io/vavr.

Coconut 的开源替代方案

相似的开源项目,按与 Coconut 的功能重合度排序。
  • dry-python/returnsdry-python 的头像

    dry-python/returns

    4,310在 GitHub 上查看↗

    Returns is a functional programming library for Python that provides type-safe containers for managing state, error handling, and optionality. It serves as a monadic container library and a type-safe error handling framework, replacing traditional try-catch blocks and null checks with Result and Optional containers to treat exceptions as data. The project is distinguished by its use of a specialized Mypy static analysis plugin to validate functional pipelines and emulate higher kinded types. It provides mechanisms for isolating side effects through IO containers and offers a framework for typ

    Python
    在 GitHub 上查看↗4,310
  • reasonml/reasonreasonml 的头像

    reasonml/reason

    10,313在 GitHub 上查看↗

    Reason is a strongly typed functional language and multi-target compiler designed to produce either JavaScript for web environments or native machine code for operating systems. It serves as an OCaml-compatible language that shares an abstract syntax tree with OCaml, providing a practical syntax for the OCaml ecosystem. The project functions as a type-safe frontend language, incorporating JSX support to build user interfaces through structural elements that translate into type-safe function calls. It enables deep integration with the JavaScript ecosystem, allowing the use of existing librarie

    OCamljavascriptocamlprogramming-language
    在 GitHub 上查看↗10,313
  • elm/compilerelm 的头像

    elm/compiler

    7,794在 GitHub 上查看↗

    This project is a functional programming compiler and JavaScript transpiler that transforms a statically typed language into optimized JavaScript for web browsers. It serves as a frontend architecture framework, providing a static type system and a package manager that enforces semantic versioning. The compiler uses a type-checking engine with automatic type inference to prevent runtime errors and guide code refactoring. It implements a structural pattern for managing application state and rendering user interfaces through a virtual DOM, utilizing immutable data and purity-based state transit

    Haskellcompilerelm
    在 GitHub 上查看↗7,794
  • purescript/purescriptpurescript 的头像

    purescript/purescript

    8,832在 GitHub 上查看↗

    PureScript is a statically typed, purely functional programming language that compiles to JavaScript. It is designed as a cross-platform frontend language for building safe web applications, utilizing a static type system and a JavaScript compiler to ensure program correctness across browser and server environments. The language is distinguished by its emphasis on mathematical purity, featuring a robust type system with first-class support for monads. It provides a sophisticated toolset for static verification, including algebraic data types, type classes, and automatic type inference to reje

    Haskellalt-jshaskelljavascript
    在 GitHub 上查看↗8,832
  • 查看 Coconut 的所有 30 个替代方案→