Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.9k views
in Technique[技术] by (71.8m points)

can we use cartouches instead of quotation marks to delineate inner syntax in jEdit Isabelle/HOL sessions

In typing statements of a proof into an Isabelle (2020) theory file, e.g.,

from ?prime p ? have p: "1 < p "

the jEdit interface application pops up a tooltip offering to insert an open cartouche command <open> when I type a quotation mark. As you can see in the line above, I have been allowing this and it seems to be permitted. The Isabelle documentation seems to view inner syntax as category embedded, which seems to permit delineation with quotation marks or with the cartouche enclosure <open ... <close>.

Is there a down side to doing this? The imports statement requires quoting a reference to a theory file "HOL-Computational_Algebra.Primes" with module.theory format and will not accept cartouche there, but in theory statements it certainly appears to be equivalent.

question from:https://stackoverflow.com/questions/65830578/can-we-use-cartouches-instead-of-quotation-marks-to-delineate-inner-syntax-in-je

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Cartouches vs quotes is currently a matter of style, except for imports, syntax definitions, and for some command arguments (like nitpick[eval=".."]).

Remark that some keyboard layouts make it possible to type them directly (e.g., mac US international).

I believe that Makarius would like to deprecate the quotes eventually. This would allow users to write "a" instead of ''a'' for strings). But don't expect that to happen anytime soon.

So: Write what you like most!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...