Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is an object-oriented extension to Tcl which is along the lines of CLOS.

http://media.wu-wien.ac.at/whatIsXOTcl.html

Lispers need to stop thinking that they are the only ones who can do "macros" and "DSLs". The evidence is clearly on the contrarian side. You can have syntax and macros and be practical.

If the failure of Tcl has taught us anything its that performance is important.



>Lispers need to stop thinking that they are the only ones who can do "macros" and "DSLs". The evidence is clearly on the contrarian side.

We know that one can do "macros" in many other languages including of course TCL. The question is how difficult is to do them and how easy is to have control over there. Lisps, due to code being s-expressions, make macro creation extremely easy, and Common Lisp has useful tools to ease working with macros, for example macroexpand, which is integrated into most Lisp IDEs to easily visualize, in-place within the code, how a macro will expand into, step by step.

In comparison to that, most languages that do allow macros, make it a cumbersome, buggy task.


XML, Julia, Rust, Crystal, Forth? support macros too. I was just pointing out that it can be done without sexp. Yes, the tooling sucks. Grammatical implementation is less powerful but that seems better than implementing a grammar ontop of sexps. You get some lexical freedom ontop of pure text that you don't get implementing grammars on top of sexps, respecting lisps tokenisation rules.

I wonder how far Lisp would have come if people had taken the source-source translator approach of js and just implemented an Algol frontend to lisp. There's plenty of things that Lisp had that are far more useful than just macros.

I think Tcl is the Unix answer to Lisp. Worse is better somehow evolved into a Lisp.


> I wonder how far Lisp would have come if people had taken the source-source translator approach of js and just implemented an Algol frontend to lisp.

People did that a number of times over Lisp's history, so Lisp would have come exactly where it has come.

The first Algol-like front end to Lisp was supposed to be the direct descendant of Lisp 1, namely Lisp 2. This branch went nowhere. The descendants of Lisp trace back to Lisp 1.5.

In the early 70's there was something called CGOL. It still exists.

There have been various more recent things in that direction.

And of course, certain contemporary languages are basically sort of Lisp-like things with Algol bolted on.

Lisp 2: https://en.wikipedia.org/wiki/LISP_2

Manual with code examples: http://www.softwarepreservation.org/projects/LISP/lisp2/Abra...

CGOL: https://en.wikipedia.org/wiki/CGOL


> is along the lines of CLOS

doesn't look to be particular CLOS-like, given that it is class-oriented and not using multiple-dispatch.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: