Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=C3=B8j?= Newsgroups: comp.os.vms Subject: Re: New VSI post on Youtube Date: Sun, 25 Aug 2024 20:40:48 -0400 Organization: A noiseless patient Spider Lines: 53 Message-ID: References: <66bcf876$0$717$14726298@news.sunsite.dk> <66bcfbe3$0$717$14726298@news.sunsite.dk> <66c397f6$0$716$14726298@news.sunsite.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 26 Aug 2024 02:40:47 +0200 (CEST) Injection-Info: dont-email.me; posting-host="2634bbcbddedc3862c86b5256e5336c2"; logging-data="2267118"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+s1WE2el4uxFv6FQmpH+2pRhthyLMxzpU=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:jTkg9YVkJ76bQSqOuFEAYuDsXB0= Content-Language: en-US In-Reply-To: Bytes: 2904 On 8/25/2024 7:37 PM, Lawrence D'Oliveiro wrote: > On Sun, 25 Aug 2024 10:22:27 -0400, Arne Vajhøj wrote: >> Python modules are not exactly like packages/namespaces, but OK close. > > Python does have package namespaces. You can do longwinded Java-style > hierarchies, if you want. It’s just not common. Python modules does way more than C++/C#/VB.NET namespaces and Java packages. The latter are a pure name thing. And the using/imports/import is a name abbreviation only thing. VB.NET: Imports x is not the equivalent of Python: import x It is (mostly) the equivalent to the difference between: import x and: from x import * ..NET assemblies and Java jars/Java 9 modules/OSGI modules provide some of the extra functionality that Python modules has over pure namespaces. >> I guess there are two approaches to naming: >> >> shorter is better -> less typing and smaller files > > There is another useful approach, and that is > > import «long-winded-name» as «short-name» > > Python supports this, too. > > Java, which needs it more, doesn’t. Lot of languages support that feature. C++, C#, VB.NET, Kotlin, Groovy, Scala etc.. But Java does not. Arne