tag:blogger.com,1999:blog-7933794355391496434.post4259679545315372094..comments2023-06-03T06:26:18.614-06:00Comments on A Million Chimpanzees: What do Interpreted Programming Languages have in Common? Part IIjames.pyleshttp://www.blogger.com/profile/11424800834517755783noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-7933794355391496434.post-57430618329038313072010-06-14T05:44:35.087-06:002010-06-14T05:44:35.087-06:00Haven't written part III yet. I've been sw...Haven't written part III yet. I've been swamped with other projects unfortunately. Hopefully sometime this summer, I'll have the bandwidth to get back to this project. Judging by the nature of some of the comments I've received in parts I and II, I have much to learn. Thanks.james.pyleshttps://www.blogger.com/profile/11424800834517755783noreply@blogger.comtag:blogger.com,1999:blog-7933794355391496434.post-12900443853802895802010-06-13T20:48:29.792-06:002010-06-13T20:48:29.792-06:00Hi,
I just want to say thank you so much for the t...Hi,<br />I just want to say thank you so much for the tutorials. This is exactly what I have been looking for. I am a concept person. I learn best when exposed to the big picture first rather than learning in little bits and pieces. <br />Have you written part III yet? I found parts I and II by searching "What do programming languages have in common" No sign of part III or beyond in the Google search results.<br />Again, thanks so much.RhondaAJohnsonhttp://lucky-ink.netnoreply@blogger.comtag:blogger.com,1999:blog-7933794355391496434.post-78015409464944895212009-12-15T09:21:23.385-07:002009-12-15T09:21:23.385-07:00No, I haven't forgotten about the tutorial. Oc...No, I haven't forgotten about the tutorial. Occupied with other tasks at the moment. Will return shortly to respond to comments and incorporate corrections. Thanks.james.pyleshttps://www.blogger.com/profile/11424800834517755783noreply@blogger.comtag:blogger.com,1999:blog-7933794355391496434.post-37996467201156377702009-12-11T07:34:11.735-07:002009-12-11T07:34:11.735-07:00The semantics of switch are quite different in dif...The semantics of switch are quite different in different languages. In the if-else example given replacement with a switch (or case) statement is quite trivial is all languages. However the 'C' select statement is essentially a selection from a set of common values, stated another way -- choosing a value from a list of possibilities. In VB the case statement can be the choosing of the first expression which evaluates to true like the if-else. Add in the fact the 'C' requires the explicit coding of the break statement, the 'C' switch is actually more reminiscent of the Fortran computed goto.<br /><br />I realize this is on the topic of interpreted languages, but break appears in PHP and Javascript. I can't speak about Ruby or Python.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7933794355391496434.post-36328876479974846972009-12-11T06:27:20.442-07:002009-12-11T06:27:20.442-07:00It would seem from the comments that this article ...It would seem from the comments that this article is being read and commented on by 'experienced' programmers. The article is a basic 'how to program' tutorial. In most 'high level' languages, there are multiple ways of achieving the same result, but it never hurts to understand the basic principles, which is what this article describes. Almost all of the 'how to' info can be applied to Fortran, Basic, Cobol, Pl/1(not so much!), C, Java etc, so lets lay off the author for making things simple (and accurate), for the 'raw' beginner.Ed Baxter, Halifax, N.S.noreply@blogger.comtag:blogger.com,1999:blog-7933794355391496434.post-86431418741979969402009-12-10T21:45:41.364-07:002009-12-10T21:45:41.364-07:00Do these languages not have "case" state...Do these languages not have "case" statements? far rather that than a long string of "if...elses".Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7933794355391496434.post-48569443408173686802009-12-10T19:37:24.990-07:002009-12-10T19:37:24.990-07:00This episode, does not say much about interpreted ...This episode, does not say much about interpreted languages. The topic as addressed could be describing any procedural language from PL/I, Cobol, C, or ....<br /><br />So why is the topic titled 'interpreted languages' and not 'procedural languages'?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7933794355391496434.post-86970815122864842992009-12-10T14:03:22.316-07:002009-12-10T14:03:22.316-07:00In Ruby simple if can be done like this:
n = 0
re...In Ruby simple if can be done like this:<br /><br />n = 0<br />return "Greater than zero" if n > 0Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7933794355391496434.post-18770660922787831902009-12-10T13:14:36.956-07:002009-12-10T13:14:36.956-07:00Not thats its always possible to avoid cleanly, bu...Not thats its always possible to avoid cleanly, but I personally can't stand to see a string of if else statements. I recommend that in the interest of readability coders try to avoid them as much as possible. In some languages switch statements are a possible solution. While the example is too trivial to be interesting, if I were to come across it I would either change it or recommend a change to (in python)<br /><br />names = [ 'Jim', 'Bill', 'Heather' ]<br />if name in names:<br /> print "Good morning,", name<br />else:<br /> print "You're not on the list"Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7933794355391496434.post-61252267375951144612009-12-10T11:38:52.777-07:002009-12-10T11:38:52.777-07:00pet peeve: mixing the brace position style in jav...pet peeve: mixing the brace position style in javascript (or C/C++). Yup, in the javascript if...else example.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7933794355391496434.post-75967688617494796842009-12-10T08:53:11.345-07:002009-12-10T08:53:11.345-07:00Isn't it crazy how new languages are forever &...Isn't it crazy how new languages are forever "reinventing the wheel"? It's just like BASIC or Pascal or C but with tweaks here and there. All the grammar is similar but the vocab is different - take your pick from {}, BEGIN END, whitespace or whatever for code blocks, try to remember what arbitary symbol the designers chose for comments, etc.<br />Might as well just have a programming editor where you can write in the style you prefer, then it converts it afterwards :)Anonymousnoreply@blogger.com