Wish List: Support for Double Quotes
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 !
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 !
7 posts
• Page 1 of 1
Wish List: Support for Double Quotes
It would be nice if Dyalog was able to support double quotes.
Pierre Gilbert
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
-
PGilbert - Posts: 439
- Joined: Sun Dec 13, 2009 8:46 pm
- Location: Montréal, Québec, Canada
Re: Wish List: Support for Double Quotes
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
"Hello" "World" = "Hello"
1 0
≡"Hello" "World"
1
-
Morten|Dyalog - Posts: 458
- Joined: Tue Sep 09, 2008 3:52 pm
Re: Wish List: Support for Double Quotes
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.
-
PGilbert - Posts: 439
- Joined: Sun Dec 13, 2009 8:46 pm
- Location: Montréal, Québec, Canada
Re: Wish List: Support for Double Quotes
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.
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
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.
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.
-
Morten|Dyalog - Posts: 458
- Joined: Tue Sep 09, 2008 3:52 pm
Re: Wish List: Support for Double Quotes
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?
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
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.
-
Morten|Dyalog - Posts: 458
- Joined: Tue Sep 09, 2008 3:52 pm
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group