Why not '\' instead of '::' for modules?

Everything else that doesn't fall into one of the other PB categories.
User avatar
skywalk
Addict
Addict
Posts: 4210
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Why not '\' instead of '::' for modules?

Post by skywalk »

I like having my cake AND eating it :wink:
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
aonyn
User
User
Posts: 43
Joined: Tue May 05, 2009 5:20 am

Re: Why not '\' instead of '::' for modules?

Post by aonyn »

Hi All,

I would not be opposed to '\', but I do like '::' for modules.
It is clear at a glance that I am looking at a module call and not a structure.
Also, to me it makes sense to use '::', as it reminds me of a namespace, which is somewhat how I see a module.

All that said, thank you for not using '_'.
I often use '_' in my naming, so for me, '_' would become an issue of breaking old habits.

Thanks again Fred and team for modules, I have been reorganizing my current project into modules, and so far I am very pleased with the implementation.

Regards,
David
User avatar
dobro
Enthusiast
Enthusiast
Posts: 766
Joined: Sun Oct 31, 2004 10:54 am
Location: France
Contact:

Re: Why not '\' instead of '::' for modules?

Post by dobro »

we could have used Alt+0135 ---->
(ALT key presses on
and the number 0135 )

it's more of a button press, but the caracter is alone and recognizable :)

I do not have the latest version of PureBasic
but I fear that "::" asks me problems with my Personal Editor (EPB)

because I use ':' to identify the lines separator ....

like:

Code: Select all

 if foo> 1: foo = 1: endif
Image
Windows 98/7/10 - PB 5.42
■ sites : http://michel.dobro.free.fr/
BorisTheOld
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Apr 24, 2012 5:08 pm
Location: Ontario, Canada

Re: Why not '\' instead of '::' for modules?

Post by BorisTheOld »

Some people are unhappy with the '\', some are unhappy with '::', and some are unhappy with '_'

I suggest we use the 'happy face', which should make everyone happy!!

For example:

ModuleName :) ProcedureName
For ten years Caesar ruled with an iron hand, then with a wooden foot, and finally with a piece of string.
~ Spike Milligan
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Why not '\' instead of '::' for modules?

Post by fsw »

Lets go for it :mrgreen:

Next all users with a german styled keyboard will come and request the use of umlauts... ä ö ü

But please before we do that let's go with the copyright sign: ©

I am to provide the public with beneficial shocks.
Alfred Hitshock
User avatar
Olliv
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Sep 22, 2009 10:41 pm

Re: Why not '\' instead of '::' for modules?

Post by Olliv »

Justin wrote: Is EndUsing really necessary?
No. You can replace it with N™ ("nick the module" ).

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

Re: Why not '\' instead of '::' for modules?

Post by User_Russian »

request the use of umlauts... ä ö ü
or ё, й, ъ, ж. :D 8)
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

Re: Why not '\' instead of '::' for modules?

Post by Justin »

No. You can replace it with N™ ("nick the module" ).
i meant to use at the top of the file:

Code: Select all

using modA
using modB
using modAlias = modC
and the compiler disables it at the end of the file so no endusing is necessary.
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: Why not '\' instead of '::' for modules?

Post by Shield »

The problem is, that C# is truly file-based whereas PureBasic
treats the source code as one huge file, so an end directive is required.

C# for example doesn't even allow source code to be included into a file.
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
User avatar
Michael Vogel
Addict
Addict
Posts: 2797
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Why not '\' instead of '::' for modules?

Post by Michael Vogel »

Justin wrote:And how about 'Using' instead of 'UseModule'? Like in C#, and make it valid only in the current file?
It's EndUsing really necessary?
Hm,
Structure / EndStructure
With / EndWith
If / EndIf
Procedure / EndProcedure
UseModule / EndUsing?

If UseModule (or however it will be called) needs and end-command, shouldn't it be named the same way other PB commands have been designed?

PS: don't forget to update the IDE (indentation, goto matching keyword etc.)
Fred
Administrator
Administrator
Posts: 18153
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Why not '\' instead of '::' for modules?

Post by Fred »

It's not 'EndUseModule' because it's not like If/EndIf and such, you don't have to pair it (you won't use UnuseModule that often).
Post Reply