discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Both kinds of quotes?

J
jon
Thu, Sep 29, 2022 11:58 AM

Now THAT statement makes no sense to me.  Adding the single quote does
not affect any code, so why does this suggestion annoy you? Others have
made good points about preserving the ability to distinguish between
strings and characters (or some other kind of data), but you raise an
objection without providing a good reason for that objection.

On 9/29/2022 7:55 AM, edmund ronald wrote:

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

OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

Now THAT statement makes no sense to me.  Adding the single quote does not affect any code, so why does this suggestion annoy you? Others have made good points about preserving the ability to distinguish between strings and characters (or some other kind of data), but you raise an objection without providing a good reason for that objection. On 9/29/2022 7:55 AM, edmund ronald wrote: > 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 > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
ER
edmund ronald
Thu, Sep 29, 2022 1:18 PM

Who says the suggestion annoys me? I just don’t think it’s worth the pain
of changing the code, validating it, and one day realizing that some
teenage genius has found an injection bug that brings down a site that uses
openscad to generate parts.

Edmund

On Thursday, September 29, 2022, jon jon@jonbondy.com wrote:

Now THAT statement makes no sense to me.  Adding the single quote does not
affect any code, so why does this suggestion annoy you?  Others have made
good points about preserving the ability to distinguish between strings and
characters (or some other kind of data), but you raise an objection without
providing a good reason for that objection.
On 9/29/2022 7:55 AM, edmund ronald wrote:

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


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Who says the suggestion annoys me? I just don’t think it’s worth the pain of changing the code, validating it, and one day realizing that some teenage genius has found an injection bug that brings down a site that uses openscad to generate parts. Edmund On Thursday, September 29, 2022, jon <jon@jonbondy.com> wrote: > Now THAT statement makes no sense to me. Adding the single quote does not > affect any code, so why does this suggestion annoy you? Others have made > good points about preserving the ability to distinguish between strings and > characters (or some other kind of data), but you raise an objection without > providing a good reason for that objection. > On 9/29/2022 7:55 AM, edmund ronald wrote: > > 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 >> > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > >
J
jon
Thu, Sep 29, 2022 1:23 PM

At least now I understand what your objection is.  Thanks

On 9/29/2022 9:18 AM, edmund ronald wrote:

Who says the suggestion annoys me? I just don’t think it’s worth the
pain of changing the code, validating it, and one day realizing that
some teenage genius has found an injection bug that brings down a site
that uses openscad to generate parts.

Edmund

On Thursday, September 29, 2022, jon jon@jonbondy.com wrote:

 Now THAT statement makes no sense to me.  Adding the single quote
 does not affect any code, so why does this suggestion annoy you? 
 Others have made good points about preserving the ability to
 distinguish between strings and characters (or some other kind of
 data), but you raise an objection without providing a good reason
 for that objection.

 On 9/29/2022 7:55 AM, edmund ronald wrote:
 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
     <mailto:discuss-leave@lists.openscad.org>


 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email todiscuss-leave@lists.openscad.org  <mailto:discuss-leave@lists.openscad.org>
At least now I understand what your objection is.  Thanks On 9/29/2022 9:18 AM, edmund ronald wrote: > Who says the suggestion annoys me? I just don’t think it’s worth the > pain of changing the code, validating it, and one day realizing that > some teenage genius has found an injection bug that brings down a site > that uses openscad to generate parts. > > Edmund > > On Thursday, September 29, 2022, jon <jon@jonbondy.com> wrote: > > Now THAT statement makes no sense to me.  Adding the single quote > does not affect any code, so why does this suggestion annoy you?  > Others have made good points about preserving the ability to > distinguish between strings and characters (or some other kind of > data), but you raise an objection without providing a good reason > for that objection. > > On 9/29/2022 7:55 AM, edmund ronald wrote: >> 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 >> <mailto:discuss-leave@lists.openscad.org> >> >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email todiscuss-leave@lists.openscad.org <mailto:discuss-leave@lists.openscad.org> >
MM
Michael Marx
Thu, Sep 29, 2022 2:52 PM

The OP asked for 'Thoughts'. All should be welcome.

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

The OP asked for 'Thoughts'. All should be welcome. -- This email has been checked for viruses by AVG antivirus software. www.avg.com
JB
Jordan Brown
Thu, Sep 29, 2022 4:08 PM

On 9/29/2022 7:52 AM, Michael Marx wrote:

The OP asked for 'Thoughts'. All should be welcome.

Absolutely.

Since I've been working a lot in languages that allow both, and since my
work style guides call for single quotes in both of them, my typing
habits occasionally forget when I'm in OpenSCAD.

Summarizing the comments, and responding to them:

  • Reserve for character type
    o Evaluates as a number?
    o I would like to think that OpenSCAD is a post-character-code
    language, one where character codes are available via chr() and
    ord() but are not a primary part of the language.  Programmers
    should not have to think about 97 meaning 'a', and should not be
    encouraged to think about it that way.
  • World has too many options.
    o Yes, but conforming to what are arguably the #1 and #2
    programming languages in the world (and are certainly two of the
    top five or so) is arguably reducing the number of options.
  • Leave well enough alone.
    o An excellent argument.
  • Reserve for future syntax.
    o Hard to counter, other than that any such thing would be unique
    - and unique is bad.

There is no problem here.  There is no new feature here.  There is
arguably a minor usability improvement - improving alignment with common
languages and making typing microscopically easier.

(Yes, the typing improvement is microscopic.  However, it's a fairly
common thing to type... it's a bit hard to come up with any other change
that would affect usage so frequently.)

Anyhow, having raised the possibility and not heard a chorus of "oh,
yeah, that annoys me every day", I'm happy to drop it.

On 9/29/2022 7:52 AM, Michael Marx wrote: > > The OP asked for 'Thoughts'. All should be welcome. > Absolutely. Since I've been working a lot in languages that allow both, and since my work style guides call for single quotes in both of them, my typing habits occasionally forget when I'm in OpenSCAD. Summarizing the comments, and responding to them: * Reserve for character type o Evaluates as a number? o I would like to think that OpenSCAD is a post-character-code language, one where character codes are available via chr() and ord() but are not a primary part of the language.  Programmers should not have to think about 97 meaning 'a', and should not be *encouraged* to think about it that way. * World has too many options. o Yes, but conforming to what are arguably the #1 and #2 programming languages in the world (and are certainly two of the top five or so) is arguably *reducing* the number of options. * Leave well enough alone. o An excellent argument. * Reserve for future syntax. o Hard to counter, other than that any such thing would be unique - and unique is bad. There is no *problem* here.  There is no new *feature* here.  There is arguably a minor usability improvement - improving alignment with common languages and making typing microscopically easier. (Yes, the typing improvement is microscopic.  However, it's a fairly common thing to type... it's a bit hard to come up with any other change that would affect usage so frequently.) Anyhow, having raised the possibility and not heard a chorus of "oh, yeah, that annoys me every day", I'm happy to drop it.
J
jon
Thu, Sep 29, 2022 4:18 PM

It annoys me every day, because I am used to using single quotes, but it
is only one of the many things about OpenSCAD which are annoying.

On 9/29/2022 12:08 PM, Jordan Brown wrote:

On 9/29/2022 7:52 AM, Michael Marx wrote:

The OP asked for 'Thoughts'. All should be welcome.

Absolutely.

Since I've been working a lot in languages that allow both, and since
my work style guides call for single quotes in both of them, my typing
habits occasionally forget when I'm in OpenSCAD.

Summarizing the comments, and responding to them:

  • Reserve for character type
    o Evaluates as a number?
    o I would like to think that OpenSCAD is a post-character-code
    language, one where character codes are available via chr()
    and ord() but are not a primary part of the language. 
    Programmers should not have to think about 97 meaning 'a', and
    should not be encouraged to think about it that way.
  • World has too many options.
    o Yes, but conforming to what are arguably the #1 and #2
    programming languages in the world (and are certainly two of
    the top five or so) is arguably reducing the number of options.
  • Leave well enough alone.
    o An excellent argument.
  • Reserve for future syntax.
    o Hard to counter, other than that any such thing would be
    unique - and unique is bad.

There is no problem here.  There is no new feature here. There is
arguably a minor usability improvement - improving alignment with
common languages and making typing microscopically easier.

(Yes, the typing improvement is microscopic.  However, it's a fairly
common thing to type... it's a bit hard to come up with any other
change that would affect usage so frequently.)

Anyhow, having raised the possibility and not heard a chorus of "oh,
yeah, that annoys me every day", I'm happy to drop it.


OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

It annoys me every day, because I am used to using single quotes, but it is only one of the many things about OpenSCAD which are annoying. On 9/29/2022 12:08 PM, Jordan Brown wrote: > On 9/29/2022 7:52 AM, Michael Marx wrote: >> >> The OP asked for 'Thoughts'. All should be welcome. >> > > Absolutely. > > Since I've been working a lot in languages that allow both, and since > my work style guides call for single quotes in both of them, my typing > habits occasionally forget when I'm in OpenSCAD. > > Summarizing the comments, and responding to them: > > * Reserve for character type > o Evaluates as a number? > o I would like to think that OpenSCAD is a post-character-code > language, one where character codes are available via chr() > and ord() but are not a primary part of the language.  > Programmers should not have to think about 97 meaning 'a', and > should not be *encouraged* to think about it that way. > * World has too many options. > o Yes, but conforming to what are arguably the #1 and #2 > programming languages in the world (and are certainly two of > the top five or so) is arguably *reducing* the number of options. > * Leave well enough alone. > o An excellent argument. > * Reserve for future syntax. > o Hard to counter, other than that any such thing would be > unique - and unique is bad. > > > There is no *problem* here.  There is no new *feature* here. There is > arguably a minor usability improvement - improving alignment with > common languages and making typing microscopically easier. > > (Yes, the typing improvement is microscopic.  However, it's a fairly > common thing to type... it's a bit hard to come up with any other > change that would affect usage so frequently.) > > Anyhow, having raised the possibility and not heard a chorus of "oh, > yeah, that annoys me every day", I'm happy to drop it. > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
JH
John Heim
Thu, Sep 29, 2022 4:22 PM

I read this thread bottom up (newer messages first) so I just wanted to
add that I think that  your 2nd point, "Can naturally embed one within
the other", is really saying that allowing both kinds of quotes makes
for more readable code, right? Natural (more readable) code is easier to
understand and less likely to contain errors.

I don't have a strong feeling on this either way but the issue has come
up for me in real life. A couple of us on this list are working on a 3D
braille library. My part is to write a script to convert space delimited
braille translation tables into a data structure in OpenSCAD code. Of
course, the quote itself is a valid braille character but worse, the
tables can contain quoted strings.

On 9/28/22 22:25, Jordan Brown 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 todiscuss-leave@lists.openscad.org

I read this thread bottom up (newer messages first) so I just wanted to add that I think that  your 2nd point, "Can naturally embed one within the other", is really saying that allowing both kinds of quotes makes for more readable code, right? Natural (more readable) code is easier to understand and less likely to contain errors. I don't have a strong feeling on this either way but the issue has come up for me in real life. A couple of us on this list are working on a 3D braille library. My part is to write a script to convert space delimited braille translation tables into a data structure in OpenSCAD code. Of course, the quote itself is a valid braille character but worse, the tables can contain quoted strings. On 9/28/22 22:25, Jordan Brown 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 todiscuss-leave@lists.openscad.org
JB
Jordan Brown
Thu, Sep 29, 2022 4:24 PM

On 9/29/2022 9:22 AM, John Heim wrote:

I read this thread bottom up (newer messages first) so I just wanted
to add that I think that  your 2nd point, "Can naturally embed one
within the other", is really saying that allowing both kinds of quotes
makes for more readable code, right? Natural (more readable) code is
easier to understand and less likely to contain errors.

Readable, type-able, et cetera.

On 9/29/2022 9:22 AM, John Heim wrote: > > I read this thread bottom up (newer messages first) so I just wanted > to add that I think that  your 2nd point, "Can naturally embed one > within the other", is really saying that allowing both kinds of quotes > makes for more readable code, right? Natural (more readable) code is > easier to understand and less likely to contain errors. > Readable, type-able, et cetera.
FH
Father Horton
Thu, Sep 29, 2022 4:34 PM

For whatever it's worth, I'd say go ahead and do it, but my heart won't be
broken if it doesn't happen.

For whatever it's worth, I'd say go ahead and do it, but my heart won't be broken if it doesn't happen.
AB
Antonio Bueno
Thu, Sep 29, 2022 6:35 PM

I think it's a question of habit:

  • Python people like having ' and ", but that's just a gateway to ''' and
    """ 😂
  • JavaScript people like having ' and ", but what they really love is ` 😁
  • C people don't even see the \ in " anymore 😅
  • Unicode people may point out that you can ‟scare” someone without
    changing anything else
  • Me? When this discussion arises (and it has, many times in many places) I
    like to add that in Spain we use « and » 😋

El jue, 29 sept 2022 a las 18:34, Father Horton (fatherhorton@gmail.com)
escribió:

For whatever it's worth, I'd say go ahead and do it, but my heart won't be
broken if it doesn't happen.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

--
Saludos,
Antonio

I think it's a question of habit: - Python people like having ' and ", but that's just a gateway to ''' and """ 😂 - JavaScript people like having ' and ", but what they really love is ` 😁 - C people don't even see the \ in \" anymore 😅 - Unicode people may point out that you can ‟scare” someone without changing anything else - Me? When this discussion arises (and it has, many times in many places) I like to add that in Spain we use « and » 😋 El jue, 29 sept 2022 a las 18:34, Father Horton (<fatherhorton@gmail.com>) escribió: > For whatever it's worth, I'd say go ahead and do it, but my heart won't be > broken if it doesn't happen. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > -- Saludos, Antonio