rebcabin / masr

Meta ASR: replacement for aging ASDL
MIT License
4 stars 0 forks source link

Should we rename `ttype` to `type`? #9

Open certik opened 1 year ago

certik commented 1 year ago

To be consistent with just symbol, expr, etc.

certik commented 1 year ago

I named it ttype to not clash with some languages that have type as a reserved keyword, but I think it's not an issue in C++, nor in Lisp/Clojure. So we should just name it type and if for some language it is an issue, the generator for that language can rename it only there.

rebcabin commented 1 year ago

No. "type," like "name," is so heavily overloaded that it loses meaning quickly. In a big code-base, there may be dozens of things called "type" and dozens of things called "name." Clojure itself uses the name "type" for multiple, subtly different things. That overloading is a source of misdirection, confusion, and loss of time.

Let's keep it "ttype"

certik commented 1 year ago

Very good. Do not close any of these "design issues", I will document this decision and then close it.