View Single Post
Old 20 August 2015, 19:57   #268
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
Originally Posted by Megol View Post
Like COMAL? The first implementation of it was based on a hacked BASIC interpreter IIRC - it is like a structured BASIC mixed with some Pascal stuff.
The early versions of it required line numbers, just like early BASICs. BUT (and this is important) one couldn't use them as a target of a GOTO/GOSUB - line numbers were only used for editing.
interesting, i'd never heard of it, but according to Wikipedia there is an implementation for Amiga

Originally Posted by Samurai_Crow View Post
What kind of language are you inventing? Text-based or icons? JIT scripted or statically compiling or a combination? OOP, structured or something entirely new?
Text-based (so i don't have to write my own editor, as well). Static compilation at least in its first incarnation, but JIT might be an interesting direction to investigate later. I do intend, at the least, to make the compilation API available from within the language itself so you can JIT "manually" if you like.

It will be multi-paradigm but especially Object Oriented (strongly typed, single-inheritance plus interfaces, like Java, but with dynamic despatch only for interfaces), and functional programming. In fact all functions are anonymous. Kind of a hybrid between D and BETA, with a context-free syntax. There will be inner functions/closures. Loops can be constructed using an anonymous function with tail recursion like so:

( ()->() if (condition)
}) ();
I realise that is quite grotesque to look at but "while" and other kinds of loop will be defined as syntactic sugar in a "base module" which is always imported by default (and which would be potentially replaceable).

After this discussion i've been thinking about possible alternative syntaxes. The syntax i have in mind is broadly C-like but with a context-free lexer it might be possible to define many other alternative syntaxes (syntices?).
Mrs Beanbag is offline  
Page generated in 0.03853 seconds with 10 queries