My ORIGINAL attempt at this (Z*PL): http://www.travellerrpg.com/CotI/Discuss/showthread.php?p=480076#post480076
I wondered what a Vilani programming language might look like.
I'd thought about column-specific fields and punch cards, and COBOLesque verbose grammars, but also cool things like quantum bits and inference engines.
I haven't come up with a satisfying, consistent language, yet, but my current effort is to show a mix of strong conservatism, strong type safety, verbosity, but also power.
I think a "more fun" language would have VERY strong ties to columns, but for now I'll stick to a marriage between COBOL and Smalltalk-80. And I'd like to add in some stuff from Quantum INTERCAL just for amusement and shininess. And maybe just a hint of JavaScript. Oh, the horror!
Working example.
I wondered what a Vilani programming language might look like.
I'd thought about column-specific fields and punch cards, and COBOLesque verbose grammars, but also cool things like quantum bits and inference engines.
I haven't come up with a satisfying, consistent language, yet, but my current effort is to show a mix of strong conservatism, strong type safety, verbosity, but also power.
I think a "more fun" language would have VERY strong ties to columns, but for now I'll stick to a marriage between COBOL and Smalltalk-80. And I'd like to add in some stuff from Quantum INTERCAL just for amusement and shininess. And maybe just a hint of JavaScript. Oh, the horror!
Working example.
Code:
IDENTIFICATION DIVISION.
PROGRAM-ID. VILANI PROGRAMMING LANGUAGE EXAMPLE
* column 1 carries flags:
* '*' = comment line
* '%' = quantum line
* '.' = end of block (?)
* '@' = loop indicator (?)
* Smalltalk-80 messaging structure and COBOL verbosity
* structured modules (program title. variables. methods.)
* quantum computing (e.g. sort of multithreaded.)
* PLEASE and MAYBE statement (and even COME FROM) - INTERCAL
FIELD DIVISION.
LET x BE INT OF LENGTH 3.
LET w BE STR OF LENGTH 16.
LET v BE RAT.
LET u BE NUM OF LENGTH 10.
LET t BE BIT OF LENGTH 4.
METHOD DIVISION.
DEFINE METHOD exampleWithNumber
WITH PARAMETER x
AS
LET VARIABLE y BE INT OF LENGTH 5.
TRUE AND FALSE NOT AND (NIL IS NIL) IF FALSE SELF HALT.
SELF SIZE PLUS SUPER SIZE -> y.
DEFINE ARRAY tempArray
AS
$a #a "a" 1 1.0
ITERATE WITH EACH
<- EACH CLASS NAME
<- ' '
END ITERATE
END DEFINE ARRAY
RETURNS
x GREATER THAN y
END DEFINE METHOD
MAIN DIVISION.
<- "Hello, world!"
Last edited: