Sujet : Re: OpenVMS system programming language
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vmsDate : 24. Feb 2025, 22:55:31
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vpipsj$1ctsq$2@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla Thunderbird
On 2/24/2025 3:23 PM, Lawrence D'Oliveiro wrote:
On Mon, 24 Feb 2025 14:37:54 -0500, Arne Vajhøj wrote:
The lack of unsigned integers is a PITA.
Also the lack of typedefs. A basic convenience, but such an important one.
typedef is very much used in C.
Type declarations are part of the Pascal way.
But I don't think it is the same in OO languages.
I have never heard a Java developer ask for it.
C# has the functionality (in using directive). But I
have never used it myself and I don't think I have
ever seen code using it (note: I am talking about
using for type alias only - using for namespace alias is
used occasionally).
Kotlin also has it and even though it is used then
I would call it rare.
I cannot demo C# on VMS< but Kotlin runs on VMS, so:
$ type ta.kt
typealias OneToMany<T> = Map<T,List<T>>
fun dump(m: OneToMany<String>, rt: String) {
println("$rt:")
for(lang in m[rt].orEmpty()) {
println(" $lang")
}
}
fun main() {
val m: OneToMany<String> = mapOf(Pair("JVM", listOf("Java", "Kotlin", "Scala", "Groovy")),
Pair("CLR", listOf("C#", "VB.NET", "F#")))
dump(m, "JVM")
dump(m, "CLR")
}
$ kotlinc """ta.kt"""
$ java -cp .:/disk0/net/kotlin/kotlinc/lib/* "TaKt"
JVM:
Java
Kotlin
Scala
Groovy
CLR:
C#
VB.NET
F#
Arne