OpenSCAD2 is a backward compatible redesign of the OpenSCAD language. The goals are:
- to make OpenSCAD easier to use;
- to make OpenSCAD more expressive and powerful, not by adding complexity and piling on features, but by making the core language simpler and more uniform, and by removing restrictions on how language elements can be composed together to create larger components.
Summary: Everything is now a first class value. Functions, modules, shapes, groups and even OpenSCAD scripts are first class values.
Why Is This So Big? Making everything first class while retaining backward compatibility is a hard design problem: everything depends on everything else. It's important to map out all of the required changes in advance, before we start implementation.
The design documentation is structured as a collection of RFCs. To comment on an RFC, click on Issues in the sidebar, and either create a new issue with the same name as the RFC, or find the existing issue.
- Ease Of Use
- Declarative Semantics
- Composable Building Blocks
- First Class Values
- Definitions And Scoping
- Simple Values: Booleans, Numbers, Strings
- Generic Sequences: Strings, Ranges, Slice Notation, Generalized Indexing, Objects
- Generators: generalized list comprehensions,
for
,if
,let
,each
- Functions: [Functions are Values](rfc/Functions.md#functions are values), [Modules are Functions](rfc/Functions.md#modules are-functions), Module Call Syntax
- Objects:
Scripts denote Objects,
script
, Object API, Literals{}
, Customization, The CSG Tree - Programming with Objects
- Object Inheritance:
include
,overlay
, mixins - Library Scripts
- Error Reporting
- Backwards Compatibility
- Implementation: Lexer, Parser, Analyzer, Coder, Evaluator