3 ms·
It's a language that is object oriented without having to teach the programmers any of the theory. The language has a considerable amount of syntactic sugar bu
by jandrese 5y ago
It's a language that is object oriented without having to teach the programmers any of the theory. The language has a considerable amount of syntactic sugar but makes for some pretty incredible looking code.
on mouseUp
put "100,100" into pos
repeat with x = 1 to the number of card buttons
set the location of card button x to pos
add 15 to item 1 of pos
end repeat
end mouseUp
- tombert 5y agoThat's really cool! Reminds me of some of the crazy stuff you can do with the Lua metatables to get really pretty code (if you are careful).
- kragen 5y agoAlthough I hate to recommend proprietary software, you might be interested in looking at Inform 7, designed for authoring interactive fiction; https://rosettacode.org/wiki/FizzBuzz#Inform_7 https://rosettacode.org/wiki/FizzBuzz#Inform_7 has an example: The space is a room. An item is a kind of thing. In the space are 100 items. To say the name: let the count be the number of items carried by the player; say "[if the count is the count to the nearest 15]fizzbuzz.[otherwise if the count is the count to the nearest 3]fizz.[otherwise if the count is the count to the nearest 5]buzz.[otherwise][the count in words].". To count: if an item is in the space begin; let the next one be a random item in the space; silently try taking the next one; say "[the name]" in sentence case; count; end the story; end if. When play begins: count. Use no scoring.
- anthk 5y agoInform6 is almost as simple if you are a programmer. I mean, is not "real life language alike" but the IF6 library makes the easiest platform to write a text game as you can set the structure of the game by design, with "literal" objects.
- mindcrime 5y agoOne day... yes, one day, Inform7 shall become Open Source.[1] Or so they claim. At this point, I'm not sure which will happen first: 1. Inform7 source is released under an OSS license 2. Patrick Rothfuss finishes the Kingkiller Chronicles book 3 3. George R.R. Martin finishes the final A Song of Fire and Ice book 4. Dean Koontz finishes the Moonlight Bay trilogy book 3 I'm skeptical any of these events will happen in my lifetime. Or the lifetime of the universe we live in. sigh [1]: https://news.ycombinator.com/item?id=20421189 https://news.ycombinator.com/item?id=20421189