discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Both kinds of quotes?

JB
Jordan Brown
Thu, Sep 29, 2022 3:25 AM

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?

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?
FS
FF Systems
Thu, Sep 29, 2022 3:50 AM

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

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 >
FS
FF Systems
Thu, Sep 29, 2022 3:52 AM

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

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 >> >
JB
Jordan Brown
Thu, Sep 29, 2022 3:57 AM

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.)

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.)
RW
Rogier Wolff
Thu, Sep 29, 2022 6:21 AM

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. 

--
** 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.

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. -- ** 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.
MM
Michael Möller
Thu, Sep 29, 2022 7:57 AM

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.

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:

  • 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.

--
** 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

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 - Use the other quote : 'Use " to quote' - Double it: "Double "" is the new single" - Escape it: "escaping the \"\\\" is next problem" - Quote Operator <https://livesql.oracle.com/apex/livesql/file/content_CIREYU9EA54EOKQ7LAMZKRF6P.html>: q'# 'best' "string"#' 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: > > > > * 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. > > -- > ** 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 >
MM
Michael Marx
Thu, Sep 29, 2022 8:20 AM

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:

  • 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?

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

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: * 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? -- This email has been checked for viruses by AVG antivirus software. www.avg.com
RW
Raymond West
Thu, Sep 29, 2022 10:53 AM

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.

  1. punctuate it in natural English language
  2. punctuate it as a valid openscad echo statement, say.
  3. punctuate it such that python or javascript can print it out.
  4. How many beans make five?
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. 1) punctuate it in natural English language 2) punctuate it as a valid openscad echo statement, say. 3) punctuate it such that python or javascript can print it out. 4) How many beans make five?
J
jon
Thu, Sep 29, 2022 11:51 AM

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.
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. >
ER
edmund ronald
Thu, Sep 29, 2022 11:55 AM

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

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 >