4 ms·
I always enjoy looking at these weird little niche languages to see what interesting ideas they have. Ink's got some interesting parallel execution concepts in
by jameshart 4y ago
I always enjoy looking at these weird little niche languages to see what interesting ideas they have. Ink's got some interesting parallel execution concepts in its 'Tunnels', but I actually think the most interesting thing Ink introduces are itsversion of 'lists', which aren't lists so much as sets, or maybe enumeration types, or maybe they're actually a dictionary with numeric values, or... maybe they're all of those things at once, using a single structure?
Also a bold - but it turns out sensible - choice, for a language oriented towards producing text to not really have extensive support for strings. Because it turns out that strings are a bad idea in most cases! What you actually want are rich templates.
- deleted 4y ago[deleted]
- scotty79 4y ago> concepts in its 'Tunnels' They have exact semantics of GOSUB, RETURN, and POP from Atari BASIC. ->tunnnel-> is GOSUB tunnel_line_number ->-> is RETURN ->tunnel2-> within a tunnel is basically POP; GOSUB tunnel2_line_number and ->knot is GOTO knot_line_number I really like thinking about translating those weird languages into some proper language as directly as possible, but for Ink the host language must have been either Atari BASIC or assembler. Labeled break and continue in modern languages is not powerful enough, even PHP goto is not powerful enough (because it can't goto into a loop or a conditional block). I mean technically you could do it by simulating goto with break and continue a and faking conditional and loops with this simulated goto, but still there would be limitation that goto target in Ink can be a variable. Also the whole point of translating language into some proper host language is to able to mix the two as freely as possible. I wonder how would modern version of goto based programming looked. What tools would we have for tracking errors in such code if we didn't abandon it altogether in favor of nested blocks and functions. Ink for example tracks dangling ends of the story (not marked with ->END or ->DONE). Maybe goto based coding environment would also have equivalent of something like that. Being split into sections that need to overtly exit to some other section or program end on all the code paths.
- jameshart 4y agoYou're absolutely right - I meant threads, which are parallel statemachines.
- scotty79 4y ago> Ink introduces are its version of 'lists' I really like how by defining type you also define variable by the same name. I was craving for such feature in many scripting languages in my programming career.
- hlship 4y agoI think the creator of [Dialog](https://linusakesson.net/dialog/index.php https://linusakesson.net/dialog/index.php) - an IF language that draws inspiration from Prolog - gets the balance between text and code right; most text is ... just text. Code is in parenthesis (looks very familiar to a Clojure developer, funny enough). Indentation and whitespace is meaningless. It can be very expressive and doesn't get in the way.