[Gambas-user] Idea for 3.17

Dimitris Anogiatis dosida at gmail.com
Sun May 9 08:55:52 CEST 2021


I might be a bit late to the conversation but I gotta a few questions.

What kind of problem are we trying to solve by introducing namespaces?

Are namespaces the only tool we can use to solve said problem?

And it also begs the question. What kind of issues are we introducing by
introducing namespaces into Gambas?
Do we need to have some sort of a converter from the non-namespaced version
to a namespaced version of our code (and vice versa) so that some sort of
compatibility is preserved between Gambas versions?

On Sat, May 8, 2021 at 8:18 PM Bruce <adamnt42 at gmail.com> wrote:

> On 9/5/21 3:15 am, Christof Thalhofer wrote
> SNIP)
>
> > Let us look at a piece of (imaginated) code:
> >
> > --------------------------------------------------------
> > Public Sub Main()
> >
> >      Use de.deganius.db As Degdb
> >
> >      Dim DegOrm as New Dgdb.Orm
> >      Dim MyOrm as New Orm
> >
> >      DegOrm.DoSomething(DegOrm.ConstantA)
> >      MyOrm.DoSomethingOther()
> >
> > End
> > --------------------------------------------------------
> >
> > What would be confusing with that? Why wouldn't it be backwards
> > compatible? If you remove the lines which have to do with namespaces
> > everything is just as before (aka runs in current Gambas).
> >
>
> It's not "confusing" but as I said originally it's not that simple. All
> your example addresses is the case of a local variable.  Consider all
> the declarations in the Gambas language where the specific Orm would
> need to be stated ...
>
> ' Gambas class file
> Inherits <ns>Orm
> Event Whatever(AnOrm as <ns>Orm)
> Class <ns>Orm
> Public/Private MyOrm as <ns>Orm
> Public/Private LotsOfOrms as <ns>Orm[]
> Property ThisOrm as <ns>Orm
> Sub DoSomething(OrmThingy as <ns>Orm)
> Function WhichOrm() as <ns>Orm
> others?
>
> where <ns> is the namespace specifier, how ever it is going to be
> implemented... colon delimiters, bang delimiters, whatever.
>
> Or we could end up with a different syntax in each case?
>
>
> ' Gambas class file
> Inherits Orm From <ns>.
> Event Whatever(AnOrm as [Orm in <ns>] )
> Class <ns>Orm
> Public/Private MyOrm as Orm Using <ns>
> etc.
>
> (Note: This is all a discussion point, not an argument for or against
> namespacing.)
>
> b
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210509/28437d9e/attachment.htm>


More information about the User mailing list