[Info-vax] OpenVMS system programming language
Arne Vajhøj
arne at vajhoej.dk
Mon Feb 24 16:55:31 EST 2025
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
More information about the Info-vax
mailing list