JavaScript and Python both allow you to put strings in either single
quotes or double quotes.
OpenSCAD uses only double quotes, and does not use single quotes for
anything.
Does anybody have any particular opinion on the idea of allowing the use
of either single or double quotes?
I don't come up with many downsides, and I come up with a couple of
minor upsides:
Any thoughts?
There are actually THREE different quote symbols on the modern PC
keyboard. IMHO, all three should be valid. I don't think that different
open/close quote characters are savory, so we can skip that option.
Whatever character "opens" the string, is the same one that "closes" it.
I like the "scary" quotes. I'm stealing that one.
On Wed, Sep 28, 2022 at 10:25 PM Jordan Brown openscad@jordan.maileater.net
wrote:
JavaScript and Python both allow you to put strings in either single
quotes or double quotes.
OpenSCAD uses only double quotes, and does not use single quotes for
anything.
Does anybody have any particular opinion on the idea of allowing the use
of either single or double quotes?
I don't come up with many downsides, and I come up with a couple of minor
upsides:
- Similarity to other popular languages
- Can naturally embed one within the other; you can write "it's" or
you can write 'these are "scare" quotes'
- Don't have to shift to type a quoted string
Any thoughts?
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Granted, in counting three (Foive is ROIT OUT!) I am interpreting the
"apostrophe" as a quote character. Perhaps there are those who find that
unsavory...
On Wed, Sep 28, 2022 at 10:50 PM FF Systems joeh@rollanet.org wrote:
There are actually THREE different quote symbols on the modern PC
keyboard. IMHO, all three should be valid. I don't think that different
open/close quote characters are savory, so we can skip that option.
Whatever character "opens" the string, is the same one that "closes" it.
I like the "scary" quotes. I'm stealing that one.
On Wed, Sep 28, 2022 at 10:25 PM Jordan Brown <
openscad@jordan.maileater.net> wrote:
JavaScript and Python both allow you to put strings in either single
quotes or double quotes.
OpenSCAD uses only double quotes, and does not use single quotes for
anything.
Does anybody have any particular opinion on the idea of allowing the use
of either single or double quotes?
I don't come up with many downsides, and I come up with a couple of minor
upsides:
- Similarity to other popular languages
- Can naturally embed one within the other; you can write "it's" or
you can write 'these are "scare" quotes'
- Don't have to shift to type a quoted string
Any thoughts?
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Yes, accent grave could be used too.
I would not encourage using accent grave and apostrophe paired. In
many fonts they pair quite poorly.
For both of those, it's hard to find other languages that do that. My
primary reason for thinking about this is commonality with other common
languages, where the quote characters are double quote and single quote
/ apostrophe.
(But for super extra spiff, we could use “curly” quotes. I'm not
suggesting that today.)
On Wed, Sep 28, 2022 at 08:25:24PM -0700, Jordan Brown wrote:
I don't come up with many downsides, and I come up with a couple of
minor upsides:
It is an easy way to allow for future expansion with another
string/character type by using the other quote. Like in C where
'a' is the character a (97) and "a" is a string (a pointer to
97, 0 in memory).
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a is going up. -- Chris Hadfield about flying up the space shuttle.
Good ol' FORTRAN used the Hollerith Constant
https://en.wikipedia.org/wiki/Hollerith_constant : NAME = 4HSCAD
I also vaguely recall a language where matched square brackets were used.
And then there is the quoted quote problem - depending on language it is
Having used dozens and dozens of languages in my lifelong career : less
options => simpler => easier.
M²
tor. 29. sep. 2022 08.22 skrev Rogier Wolff R.E.Wolff@bitwizard.nl:
On Wed, Sep 28, 2022 at 08:25:24PM -0700, Jordan Brown wrote:
I don't come up with many downsides, and I come up with a couple of
minor upsides:
It is an easy way to allow for future expansion with another
string/character type by using the other quote. Like in C where
'a' is the character a (97) and "a" is a string (a pointer to
97, 0 in memory).
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
**
** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a is going up. -- Chris Hadfield about flying up the space shuttle.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
But also NOT similar to other popular languages.
You can write "it's" ATM, "these are "slasher" quotes" isn't too hard.
I think saving a shift is getting close to the bottom of the barrel for a justification ;)
With still-symptomatic, post-release, bilateral carpel tunnel I really DO like to save characters, but there is a limit...
[I'd really like to use h= in linear_extrude()...]
This would consume a delimiter which could possibly be useful for a future new syntax.
I don't have one in mind ATM, but e.g. perhaps for metadata or some other data structure.
From: Jordan Brown [mailto:openscad@jordan.maileater.net]
Sent: Thu, 29 Sep 2022 13:25
To: OpenSCAD
Subject: [OpenSCAD] Both kinds of quotes?
JavaScript and Python both allow you to put strings in either single quotes or double quotes.
OpenSCAD uses only double quotes, and does not use single quotes for anything.
Does anybody have any particular opinion on the idea of allowing the use of either single or double quotes?
I don't come up with many downsides, and I come up with a couple of minor upsides:
Any thoughts?
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
on the pub sign, the signwriters apprentice had left out the spaces
between dog and and and and and duck.
John where Bill had had had had had had had had had had had the
examiners approval.
having entered the restaurant the panda eats shoots and leaves.
time flies like an arrow fruit flies like a banana.
I would welcome being allowed to use either "'" or '"' as string quote
delimiters.
On 9/29/2022 2:21 AM, Rogier Wolff wrote:
On Wed, Sep 28, 2022 at 08:25:24PM -0700, Jordan Brown wrote:
I don't come up with many downsides, and I come up with a couple of
minor upsides:
- Similarity to other popular languages
- Can naturally embed one within the other; you can write "it's" or
you can write 'these are "scare" quotes'- Don't have to shift to type a quoted string
It is an easy way to allow for future expansion with another
string/character type by using the other quote. Like in C where
'a' is the character a (97) and "a" is a string (a pointer to
97, 0 in memory).
Roger.
Don't get ticked off by my intervention, but can't we just leave well
enough alone here?
On Thu, Sep 29, 2022 at 1:52 PM jon jon@jonbondy.com wrote:
I would welcome being allowed to use either "'" or '"' as string quote
delimiters.
On 9/29/2022 2:21 AM, Rogier Wolff wrote:
On Wed, Sep 28, 2022 at 08:25:24PM -0700, Jordan Brown wrote:
I don't come up with many downsides, and I come up with a couple of
minor upsides:
* Similarity to other popular languages
* Can naturally embed one within the other; you can write "it's" or
you can write 'these are "scare" quotes'
* Don't have to shift to type a quoted string
It is an easy way to allow for future expansion with another
string/character type by using the other quote. Like in C where
'a' is the character a (97) and "a" is a string (a pointer to
97, 0 in memory).
Roger.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org