Version 2 of expr should be deprecated

Updated 2023-03-01 17:44:51 by SYSTems

I hope the expr command gets deprecated

Since TIP 174: Math Operators as Commands I would have hoped that all future improvement would go into Math Commands

But I see several pending tip suggesting improvements to the expr command

I hope that those tips get abandoned or withdrawn Adding mini languages to Tcl is in my opinion very bad language design and adds complexity

I understand that expr is part of Tcl's history and heritage, but I think as Tcl seem moving toward version 9 and hopefully towards a slight revival, I think its also time to just declare commitment to Tcl's command syntax it is in my opinion cleaner and less confusing and promotes homoiconicity better (for my poor understanding of what homoiconicity means)


stevel - 2023-03-01 08:14:18

I don't see expr ever being deprecated, but do think a discussion of ways to better handle expressions would be helpful. As you have noted, there are already proposals on the table.

At present there is a focus on getting 9.0 out the door but there's no reason why you couldn't revive the discussion with a view to the feature being in Tcl 9.1. A good place to start would be Math Operators as Commands.


SYStems - March 1, 2023 12:42:19 PM

Tcl is a nice glue language, the ultimate glue language in my opinion I think the command line interface is the best option for glue languages I also like a lot John Ousterhout Ousterhout's Dichotomy

So Tcl hosting secondary language is not necessarily a horrible idea regexp can be considered as a mini or secondary language inside Tcl

But I can't think of Math operators as mini language So I think either expr should be deprecate or be repositioned as a gateway (interface) to a more complete math system (another language/interpreter that does math better)

This way Tcl can delete Math / Regexp to other interpreter that have better implementations for those features