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 would 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 used to create new syntax are Haskell, C++, and Python.Possible examples of where syntax could be modified without a strong type system maybe Scheme, Forth, and 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 simplicity of C, Lua or Erlang, but with the ability to create additional syntactic operators as desired.TLDR - basic summary of question:Is it possible for weakly typed language to support syntax extension, or does the ability to extend the syntax of a language (from within the language itself) require a type system to implement?
Syntax extension in weakly typed lanuages?
syntax;weak typing