I like languages that give me the ability to extend the syntax of the language. At the same time, all the languages that I know will let me extend the syntax have relatively heavy type systems. Are there lighter weight languages that allow the same sort of syntax extensibility? Or does flexible syntax require that you be able to define new data types (and operations on those types)?
Basically I want the syntactic flexibility of Haskell without Haskell's type system. Is there a way to get this, or does that syntactic flexibility require the assistance of a type system?
Examples of languages where I know the type system can be abused to create new syntax
Haskell, C++, Python (cf. the recent thread on the pipe operator in Python)
Possible examples of where syntax could be modified without a strong type system maybe:
Scheme, Forth, Common Lisp?
However, while I can see how to overload operators in the first list to generate new syntactic constructs, I don't know enough to know how to do it in the second list. Maybe the answer is for me to go read up on macros in Common Lisp.
What I would like is a language with the conceptual complexity of C, Lua or Erlang, but with the ability to create additional syntactic operators as desired.
Basically I want the syntactic flexibility of Haskell without Haskell's type system. Is there a way to get this, or does that syntactic flexibility require the assistance of a type system?
Examples of languages where I know the type system can be abused to create new syntax Haskell, C++, Python (cf. the recent thread on the pipe operator in Python)
Possible examples of where syntax could be modified without a strong type system maybe: Scheme, Forth, Common Lisp?
However, while I can see how to overload operators in the first list to generate new syntactic constructs, I don't know enough to know how to do it in the second list. Maybe the answer is for me to go read up on macros in Common Lisp.
What I would like is a language with the conceptual complexity of C, Lua or Erlang, but with the ability to create additional syntactic operators as desired.