Wish List: Support for Double Quotes

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

Wish List: Support for Double Quotes

Postby PGilbert on Sat Nov 26, 2011 2:09 pm

It would be nice if Dyalog was able to support double quotes.

      A←'It''s raining, isn''t it?'
A
It's raining, isn't it?

B←"It's raining, isn't it?"
B
It's raining, isn't it?

A≡B
1


Pierre Gilbert
User avatar
PGilbert
 
Posts: 439
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: Wish List: Support for Double Quotes

Postby Morten|Dyalog on Mon Nov 28, 2011 9:15 am

We have been reserving double quotes for a scalar string type (which is implemented by APL#, and may be added to Dyalog APL in the future):

"Hello" "World" = "Hello"
1 0

≡"Hello" "World"
1
User avatar
Morten|Dyalog
 
Posts: 458
Joined: Tue Sep 09, 2008 3:52 pm

Re: Wish List: Support for Double Quotes

Postby PGilbert on Mon Nov 28, 2011 1:48 pm

Thanks for the education Morten, I would have thought that a simple thing like double quotes would be implemented equally between APL providers but looks like its not the case (APL+Win and APLX support the double quote has explained above) and I am sure your reasons are as valid are the ones of the other APL providers.
User avatar
PGilbert
 
Posts: 439
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: Wish List: Support for Double Quotes

Postby rex on Wed Apr 03, 2024 3:10 pm

Still no progress on this?

In most other APLs, I can say
  A←"Don't"

This would be an issue when migrating from APL+Win to Dyalog.
rex
 
Posts: 12
Joined: Sat Jun 10, 2023 10:49 pm

Re: Wish List: Support for Double Quotes

Postby Morten|Dyalog on Thu Apr 04, 2024 3:49 pm

I'm not sure the "most other APL's" statement is entirely accurate. APL+Win supports this but the implementors did not (as far as I know) consult other vendors when doing it. APLX, which was very much a clone of APL+Win at the language level, followed suit, but I am not aware of other APL systems that behave exactly the same way.

It remains our opinion that this was a bad design choice; there are better potential uses for the double quote and we are not ready to burn this bridge for short-term gain.

We're working on semi-automatic conversion tools for APL+Win code which will be able to handle most common cases of this, including your example. It gets tricky if people are building strings to throw at ⍎ or ⎕FX, but in the APL+Win application I am working on converting right now, that affects 1 out of 3,000 functions.

P.S. I just learned there is a web page where you can search for differences between array languages: Go to https://omnibar.rubenverg.com/ and enter " in the search field.
User avatar
Morten|Dyalog
 
Posts: 458
Joined: Tue Sep 09, 2008 3:52 pm

Re: Wish List: Support for Double Quotes

Postby rex on Thu Apr 04, 2024 3:55 pm

Yeah, I guess "most" is vague.
I did check, and Bob Smith's NARS2000 supports double-quotes.
Do you know of APLs beside Dyalog that do not support them?
rex
 
Posts: 12
Joined: Sat Jun 10, 2023 10:49 pm

Re: Wish List: Support for Double Quotes

Postby Morten|Dyalog on Thu Apr 04, 2024 4:08 pm

rex wrote:Do you know of APLs beside Dyalog that do not support them?


IBM/LOGON APL2 does not, and although GNU APL and a couple of experimental APLs support double quotes, they do not define them the same way as APL+Win: A double-quoted string is aways a vector, and can contain "escaped" characters.

If we were to start using double quotes, we would either follow that track, or use them to define an atomic string data type for interop with languages which distinguish between strings and lists of characters.
User avatar
Morten|Dyalog
 
Posts: 458
Joined: Tue Sep 09, 2008 3:52 pm


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest