On 10/31/2011 3:12 PM, Sean P. DeNigris wrote:
Would it be difficult/valuable to create an alternate comment syntax? I often
find myself wanting to comment a large block itself containing comments. It
would be nice to have something like C++'s /* */. I feel like this may have
been brought up before, but couldn't find it searching the lists.
Sean
My favorite string and comment handling is Lua.
In Lua you can create strings as in many languages with quoting via ' or ".
Lua also provides string creation via double square brackets,
ie: [[ a string ]]
Everything between [[]] is a string.
These are there standard conventions.
Then they also allow user created delimiters.
Any string can be created with [=[ a string ]=]
You may place any number of = characters between the two open brackets
and an equal number between the two closing brackets.
This makes for string creation which automatically allows for inclusion
in the string any of the normal string delimiters.
The reason I mention this in this thread is that they do similar for
comments.
Lua comments are single line
-- this is a comment
Or multiline
--[[ this is a
multiline
comment
--]]
or
--[=[ another
multiline comment
with user defined
delimiters
-]=]
I don't know if anything like this can be brought into Pharo.*
But I think it is an awesome and very convenient way to do strings and
comments. *no requirement to use these specific delimiter choices.
I never liked the limitations imposed in Smalltalk's string and comment
creation.
Just a few thoughts.
Jimmie