Follow up on kanji coding method: Wuji
Turns out there is a character input method like the one I described in my previous post.
Sounds like it turns out to be kind of awkward to use. Ah well...
About languages that bridge the gap between minds and machines.
Turns out there is a character input method like the one I described in my previous post.
Sounds like it turns out to be kind of awkward to use. Ah well...
Posted by Chris Bogart at 9:52 PM 0 comments
I was just reading through Niklaus Wirth's paper, "Good Ideas, Through the Looking Glass" (found through Lambda the Ultimate, of course!) where he talks about the Dangling Else problem.
Some programming languages have statements of the form:
andif X then Y
with noif X then Y else Z
end
keyword or bracket, leading to the problem of how to interpret:
Do we see a movie if it's not Saturday, or if it is Saturday, but it's cloudy?if
it's Saturdaythen if
it's sunnythen
have a picnicelse
see a movie
We spent most of our time sitting on the back porch watching the cows playing Scrabble and reading.It reads funny in English, but we resolve it easily because we know the context. Obviously context is not as helpful for a compiler.
We spent most of our time sitting on the back porch watching the cows, playing Scrabble and reading.or
Playing Scrabble and reading, we spent most of our time sitting on the back porch watching the cows.The first suggestion corresponds approximately to Wirth's preference for an
end
keyword; the comma signals a break of some kind, and the obvious interpretation is that the cows and the scrabble shouldn't be too closely associated. It's not nearly so rigorous as end
, of course.if
it's not Saturday then
see a movie else if
it's sunny then
have a picnic.Posted by Chris Bogart at 9:45 AM 0 comments
Every software developer uses a variety of languages to develop a program. It may seem like you're developing something purely in Perl or Java or VB or whatever, in fact you're using a lot of mini-languages to manage the development process:
Posted by Chris Bogart at 8:37 PM 0 comments