Imports with versions
Paulo Pinto
pjmlp at progtools.org
Tue Oct 30 05:25:33 PDT 2012
On Tuesday, 30 October 2012 at 08:44:48 UTC, Jacob Carlborg wrote:
> On 2012-10-30 01:51, bearophile wrote:
>> There are some updated on the Java-like language Ceylon:
>>
>> http://ceylon-lang.org/blog/2012/10/29/ceylon-m4-analytical-engine/
>>
>>
>> One of the features of Ceylon that seems interesting are the
>> module
>> imports:
>>
>> http://ceylon-lang.org/documentation/1.0/reference/structure/module/#descriptor
>>
>>
>>
>> An example:
>>
>> doc "An example module."
>> module com.example.foo 1.2.0 {
>> import com.example.bar 3.4.1
>> import org.example.whizzbang 0.5;
>> }
>>
>>
>> I think it helps avoid version troubles.
>>
>> A possible syntax for D:
>>
>> import std.random(2.0);
>> import std.random(2.0+);
>
> It probably wouldn't be a bad idea to have this but wouldn't it
> be better to have a package manger to handle this.
.NET and OSGi are similar approaches, because they rely on
dynamic linking.
The package manager only works with static linking, otherwise you
might get into the situation it compiles fine, but runs into
version conflicts when running. Common scenario to anyone doing
Java development.
One issue both systems have problems solving is what to do when
third party libraries have conflicting version requirements.
--
Paulo
More information about the Digitalmars-d
mailing list