Archive: Weird Quotes Suggestion


Weird Quotes Suggestion
I have a suggestion for the quotes. Instead of using the actual weird system, NSIS can use two quotes when another quote is used inside that one. exemples:

this is the actual system used in NSIS:

Exec 'REGEDIT.EXE /S "Registry\Delete Current User - RIT.REG"'

this is what I suggest:
Exec ""REGEDIT.EXE /S "Registry\Delete Current User - RIT.REG"""

I think it's easier and we avoid working with weird characters like ' and ยด.


And then what would you write for an empty string?


"Besides "that, "using "these "characters "you can easily see if some string should still" be" closed" or" not"""""""(????).

-Hendri.


After an empty string there's a carriage return, isn't it?

Anyway, what's the point of "empty strings"? I read in documentation that when are specified the default is used.



I didn't understand what Smil2Me said, sorry :-(


I meant to say that it's a lot easier to work with
`Hi this 'is "some" text' string`
than with
"Hi this "is "some" text" string"
for the reason mentioned in the previous post (not easy to see what quotes start a string and which end one inside a string. Besides that, in the example above, it's not clear what is wanted:
this:
"Hi this " ... "some" ... "string"
or this:
"Hi this is some text string"
"is some text"
"some"
(so with substrings...).
I hope you see, that to overcome this confusion, we need different quotes.


-Hendri.


I didn't suggest this:
"Hi this "is "some" text" string"

I suggested this:

"""Hi this ""is "some" text"" string"""

which is clear and uses the same character for the same function.

See you in next reply :)


Ok, anyway, we then need new quotes to define empty strings as KiCHiK pointed out, because it's not clear what is ment by:

"" ""

(two empty strings or a space surrounded by some quotes).

-Hendri.


Originally posted by Smile2Me
[B]Ok, anyway, we then need new quotes to define empty strings as KiCHiK pointed out, because it's not clear what is ment by:

"" ""

(two empty strings or a space surrounded by some quotes).



Ok. I am a general user of NSIS, and I understand your advices, but when should we use a space surrounded by a double quote?


And a question: the only problem this suggestion faces is the empty string and the quoted space?

A space can be necessary to seperate words...
Eg.: when editing a file with some script that might construct the sentence using words or something...

You can think of numerous examples why it might be nessecary.

Only using double quotes is to restrictive in general. It might be possible for some applications, but not for all!!!

BTW, feel free to adapt the source if you do not agree :)

-Hendri.


Sorry Smile2Me I didn't understand your reply. I know that spaces are used to separate words.

Was this reply an answer to the two questions I asked before?


Another thing, I am not thinking of changing the source to adapt it to the use of double quotes. My suggestion was to simplify the quotes system. If we don't simplify them it will remain complex, that's all :)

Thanks.


There's no need changing. The way it works now is fine. Why break all the scripts out there over someones personal preference.


Quote:


Originally posted by n0On3


Hey!! it's not a personal preference!!

I read in the documentation that it was weird the way NSIS handled quotes, and I agreed with that. Then I had this idea and I posted it here to see if developers like it.

I think it's easier to read scripts with the double quote system, rather than the actual one.

There's a need of change if we find an easier way to handle quotes.

It's true that if NSIS developers implement this system we can break some scripts, but we can find a workaround :cool: NSIS could handle for some versions the two quote systems, although just one is described in the documentation. If you (ever) decide to implement directly the double quote system, you can make NSIS report this compilation error like this "changed quote policy, please read NSIS documentation".

But NSIS developers only have to implement the double quote system if we, users, found that this system is better than the other.

I haven't read anyone saying that this system is better than the other.
I still don't see the need. What is the benefit? I've written several complex installers and never had a problem with the quoting system. There are other features that are far more important.

I still don't see the need. What is the benefit? I've written several complex installers and never had a problem with the quoting system. There are other features that are far more important.
I fully agree. BTW, supporting two systems is first of all far from clarifying and second I guess also impossible. I will not explain this time. You will understand now or later if you try to implement it yourself.

-Hendri.

Originally posted by rainwater


I still don't see the need. What is the benefit? I've written several complex installers and never had a problem with the quoting system. There are other features that are far more important.


You don't see the need because there's no need when you already know how to work with it.

The benefit is that is easier to know how to write scripts and visually easier to understand when reading.

This improve I suggest doesn't improve NSIS, but does improve its usability.

I know that the actual system works, I am using it. What I suggested is to simplify the system, but I see Developers prefer to work in other areas.

See You,

Originally posted by rainwater
There's no need changing. The way it works now is fine. Why break all the scripts out there over someones personal preference. Hey!! it's not a personal preference!!

I read in the documentation that it was weird the way NSIS handled quotes, and I agreed with that. Then I had this idea and I posted it here to see if developers like it.

I think it's easier to read scripts with the double quote system, rather than the actual one.

There's a need of change if we find an easier way to handle quotes.

It's true that if NSIS developers implement this system we can break some scripts, but we can find a workaround :cool: NSIS could handle for some versions the two quote systems, although just one is described in the documentation. If you (ever) decide to implement directly the double quote system, you can make NSIS report this compilation error like this "changed quote policy, please read NSIS documentation".

But NSIS developers only have to implement the double quote system if we, users, found that this system is better than the other.

I haven't read anyone saying that this system is better than the other.

Quote:


Yes, I am not a developer I am just a user of NSIS.

I didn't know that other languages used this strange system for quotes, so if you developers feel comfortable with it, what can I (and the rest of the world) do?

Regarding the flaws, I made some questions about these flaws and nobody answered. Then I still think we can avoid them.

I want to get some answers from you: You don't like the idea because it's not practical, because you see some flaws, or because it is difficult to implement? :weird:


Originally posted by n0On3
I want to get some answers from you: You don't like the idea because it's not practical, because you see some flaws, or because it is difficult to implement? :weird:
All of the above. The current method does not have any limitations as far as I can tell. Why change something that is not broken to something that will offer nothing new. No one is not using NSIS because of its quoting system. In fact, the docs clearly state how to use it.

Ok. Then we leave it this way.


Hi,

Just my 2 cents worth.
For starters I'm happy with the current quoting system although I'd like to actually see it extended to handle most of the non-alpha numeric chars so that ^asdf ghjk^ would for example also be a quoted string.

The "Quote ->""<- Quote" style is used by VB/VBSCRIPT as well as rexx (which also supports multiple quote characters) and probably other languages but is a real pain when used with preprocessors (and I think also less readable).
It is much easier to say my string will never contain character 'x' and use it for quotes than to double up quotes where the string might be built out of multiple components and used for multiple purposes.
Bye
Dennis



Originally posted by n0On3



You don't see the need because there's no need when you already know how to work with it.

The benefit is that is easier to know how to write scripts and visually easier to understand when reading.

This improve I suggest doesn't improve NSIS, but does improve its usability.

I know that the actual system works, I am using it. What I suggested is to simplify the system, but I see Developers prefer to work in other areas.

See You,
Since the method currently used by NSIS is used by many programming and scripting languages, I don't see how your method would improve its usability. Since most people who are creating their installers are developers, there's not a problem here. I've never seen your method used anywhere and it has its flaws which were already pointed out.