[PB 5.2b4] Please Rename Module to Package

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: [PB 5.2b4] Please Rename Module to Package

Post by fsw »

This request was almost completed with PB 5.2b5
Library "Module" was renamed to "Music".
The only thing that remains is the renaming of UnusePackage, as "unuse" is not a commonly used word (there is "unused" but this doesn't fit either).
Suggestions:
Bind / Unbind suggested by Demivec;
Attach / Detach suggested by Luis;
Use / Release suggested by fsw.

Thinking of it: Attach / Detach would be the best choice.

I am to provide the public with beneficial shocks.
Alfred Hitshock
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: [PB 5.2b4] Please Rename Module to Package

Post by Psychophanta »

fsw wrote:EDIT: This request was almost completed with PB 5.2b5
Library "Module" was renamed to "Music".
The only thing that remains is the renaming of UnusePackage, as "unuse" is not a commonly used word (there is "unused" but this doesn't fit either).
Suggestions:
Bind / Unbind suggested by Demivec;
Attach / Detach suggested by Luis;
Use / Release suggested by fsw.

Thinking of it: Attach / Detach would be the best choice.
- end of edit -
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The commands would look like this:

Code: Select all

DeclarePackage
EndDeclarePackage
Package
EndPackage
UsePackage
UnusePackage
See here:
http://www.purebasic.fr/english/viewtop ... 3&start=25

The reason:
Modules already exist as music modules...

Code: Select all

CatchModule
FreeModule
GetModulePosition
GetModuleRow
IsModule
LoadModule
ModuleVolume
PlayModule
SetModulePosition
StopModule
Thanks

BTW: ClosePackage is the logical complementary command to UsePackage instead of UnusePackage.
It follows the following conventions:

Code: Select all

UseGadgetList() / CloseGadgetList()
Use...Database() / OpenDatabase() / CloseDatabase()
Use...Packer() / OpenPack() / ClosePack()
What i would probably do if I were Fred:

1) Leave named the package lib as 'Music'.
2) Don't change the name of the functions inside the 'Music' lib; i.e. leave it as PlayModule(), FreeModule(), etc.
3) Rename the new 'Module' stuff as 'Section'.
4) Use the following keywords for the new 'Section' stuff:
DeclareSection / EndDeclareSection
Section / EndSection
and for use it as imported:
WithSection / EndWithSection
and think about
ImportSection / EndImportSection

Thanks!
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Phil7
New User
New User
Posts: 3
Joined: Thu Jun 27, 2013 5:34 am

Re: [PB 5.2b4] Please Rename Module to Package

Post by Phil7 »

Hi,
I have allready posted my suggestion on this topic a few days earlier in the wrong place: :oops:
WithModule - EndWithModule

1. I would really prefer to keep the term "Module" for the Namespace-thing, just because when I was first reading about it,
I had all the right associations to it. And in the the same way, I feel about renaming those Music-procedures.
In my opinion, this is a very good decision! Whenever I was reading "Module-Library", I had to look it up, until I realized:
Ah, this is suposed to play Music... funny Name :?

2. I would choose With - EndWith as a prefix instead of UseModule, because the functionality is quite the same.
You use "with" if you don't want to write the name of the structure again and again.
So, from a PureBasic-traditional point of view, this would fit in the way, language is used so far in PureBasic.
But I'd really like to hear the opinion of a british native-speaker, because I think a native-speaker is noticing some
odd things in the first place. There is definitly no point in choosing a consistent word, that sounds completely weird
to a native english person.

I really like PureBasic and I think, that there is some importance in wisely choosing the right terms, because this is part
of the beauty of a programming language. I know, that PureBasic was just appealing to me, when I first saw the code
a few years ago. Espacially when I think about constants and Gadgets, I often experienced, that the given names are
just right.

Thanks for this inspirational work of yours, Fred! :)

Phil
User_Russian
Addict
Addict
Posts: 1518
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: [PB 5.2b4] Please Rename Module to Package

Post by User_Russian »

I propose to rename DeclareModule / EndDeclareModule in PublicModule / EndPublicModule.
Because this block are located public objects module.

Also propose to rename UnuseModule in UnUseModule.
Because now it is easy to confuse UseModule with UnuseModule.
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: [PB 5.2b4] Please Rename Module to Package

Post by Tenaja »

User_Russian wrote:I propose to rename DeclareModule / EndDeclareModule in PublicModule / EndPublicModule.
Because this block are located public objects module.
I will +1 this.

I have been wondering why not keep the naming convention that PB currently uses (protected & global...). Private and External could be other easily understandable keywords which could be applied to variables & functions at declare time, and makes the DeclareModule / EndDeclareModule moot all together.
Post Reply