Page 1 of 2
Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Wed Feb 06, 2013 11:56 am
by Psychophanta
Deprecate words 'Dim', 'NewList', 'NewMap' and use just 'Array', 'List' and 'Map' respectively instead.
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Wed Feb 06, 2013 12:03 pm
by gavindi
I like your suggestion. It would bring a little more consistency to the syntax. +1
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Wed Feb 06, 2013 12:05 pm
by STARGÅTE
Dim fill a Array (global or structure) with null, and we have a ReDim to expand the array. You will rename it to ReArray?
NewList and NewMap creates new lists or maps.
Array, List and Map don't create it directly, it will use only in procedure parameters or in structes.
So I think the different names are right!
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Wed Feb 06, 2013 12:08 pm
by Little John
STARGÅTE wrote:So I think the different names are right!
+1
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Wed Feb 06, 2013 12:38 pm
by Michael Vogel
What about a new dim called NewDim (or NewArray) then? Next step would RedimArray, of course
Not easy to get a consistent catalouge of function names - as a result, I sometimes need to check the help file to find some rarely used function names, because I forgot, if it was CountListSize or ListCount or ListSize, or even ListItems?
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Wed Feb 06, 2013 1:15 pm
by Thade
Why not just let it as it is?
It works - it's BASIC - and Hundreds and Thousands of usermade Functions are programmed with it!
Shall we always change our Software because someone has a new idea?
Adding stuff is good - changing it is bad in most cases - especially if it is used since "centuries"
Especially removing Dim from Basic would be a scandal ... unthinkable ... used it since Commodore PET 2032 ... and that was in 1978
.
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Wed Feb 06, 2013 5:41 pm
by BorisTheOld
Thade wrote:Why not just let it as it is?
+9999999

Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Wed Feb 06, 2013 5:57 pm
by Psychophanta
Michael Vogel wrote:What about a new dim called NewDim (or NewArray) then? Next step would RedimArray, of course
Not easy to get a consistent catalouge of function names - as a result, I sometimes need to check the help file to find some rarely used function names, because I forgot, if it was CountListSize or ListCount or ListSize, or even ListItems?
+1
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Sat Nov 01, 2014 10:25 am
by uwekel
I just had the same idea. At least for NewList and NewMap renaming to just List and Map makes sense for me. The New prefix is not really required, and without it is similar when using them inside a structure.
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Sat Nov 01, 2014 10:49 am
by TI-994A
Thade wrote:...removing Dim from Basic would be a scandal ... unthinkable ... used it since Commodore PET 2032 ... and that was in 1978

More like
1964!
BASIC Commands - THE ORIGINAL-ORIGINAL VERSION
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Sat Nov 01, 2014 11:15 am
by Karellen
STARGÅTE wrote:
So I think the different names are right!
Thade wrote:
Why not just let it as it is?
+ 10^48
I think changes in the syntax should be the absolute exception and require very good reasons.
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Sat Nov 01, 2014 12:31 pm
by Thade
TI-994A wrote:Thade wrote:...removing Dim from Basic would be a scandal ... unthinkable ... used it since Commodore PET 2032 ... and that was in 1978

More like
1964!
The PET was available in Germany in 1978
And I do not think it was 1964 elsewhere in the world ...
In 1964 The Beatles were #1 to #5 in the US Charts ... I don't know how many people used home computers these days. But I bet it were less than 1
The first programmable calculator with magnet strips to save code I had was in 1976 or so ... a TI-59
Using a PET in 1964 shows that you must come from a parallel universe ... please tell us more about it
BTW: In 1983 I had also a TI-99 4A and published a game ... hmm ... have to look up the name ...
Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Sat Nov 01, 2014 1:19 pm
by TI-994A
Thade wrote:Using a PET in 1964 shows that you must come from a parallel universe ...
Since my post was referring to the BASIC
Dim statement, it seems that you're the one living in the parallel universe.
Thade wrote:BTW: In 1983 I had also a TI-99 4A and published a game ...
Me too. I did a version of
Space Invaders and
Cluedo. Come to think of it, having had to save all the hours of typing onto cassette tape, my trusty old TI-994A
never crashed on me. That's good engineering.

Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Sat Nov 01, 2014 2:22 pm
by ostapas
uwekel wrote:I just had the same idea. At least for NewList and NewMap renaming to just List and Map makes sense for me. The New prefix is not really required, and without it is similar when using them inside a structure.
Me likes this idea too. But I suspect, Fred visits "Feature Requests and Wishlists" just once a year and picks up a random one

Re: Deprecate words 'Dim', 'NewList', 'NewMap'
Posted: Sat Nov 01, 2014 2:53 pm
by Tenaja
STARGÅTE wrote:NewList and NewMap creates new lists or maps.
Array, List and Map don't create it directly, it will use only in procedure parameters or in structs.
Playing devils advocate

, if we adhere to this philosophy, then we would have to change all other variables to include the New word...
Protected TestVar.Newi
The reality is that having the keyword within a Structure or Procedure declaration makes the language unambiguous.
I find this request totally logical. I have requested a similar "standardizing" of the syntax consistency, to expand the PeekS and PokeS format to include a new ReadS, instead of Read.s.
http://purebasic.fr/english/viewtopic.php?f=3&t=59865
With this current request, most of the votes for "Don't change" are because people do not want to update old code. However, Fred is very good at depreciating commands without immediately eliminating them...but even so, only the simplest of 4.x code works in a current compiler without edits. Heck, even 5.2 (?) forces an update if code contains pointer typing.
IMHO, this will be an exceptionally easy port; a mere search/replace. It will not
significantly help current experienced users. (Although I, myself, just an average guy with several MB of code, still just automatically type List for everything and fix the syntax errors where NewList is required.) However, this Wish will advance the simplicity of PB, reducing its quirks, and make it even easier for newbies.
I am +1.