tag:blogger.com,1999:blog-27488238.post7962428710744284836..comments2024-03-12T20:04:08.013+01:00Comments on taw's blog: The right to criticize programming languagestawhttp://www.blogger.com/profile/16972845140253292628noreply@blogger.comBlogger65125tag:blogger.com,1999:blog-27488238.post-44992918448988646892015-06-25T17:53:39.333+02:002015-06-25T17:53:39.333+02:00One of the best blog and great knowledge I got thr...One of the best blog and great knowledge I got through this post, Thanks for for creating this informative blog. <a href="http://www.updatedreviews.in/webhostinghub-review.html" rel="nofollow">webHostingHub Review</a>neha kumarihttps://www.blogger.com/profile/18182887762599527246noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-45790530778415739622015-03-21T23:54:58.564+01:002015-03-21T23:54:58.564+01:00Possible Piper said...
Good luck with the taking a...Possible Piper said...<br />Good luck with the taking any Java program and running it on a mobile phone thing.<br /><br />All Android phones run Java programs all the time.<br />Even before smartphones, most phones supported some light version of Java.Anonymoushttps://www.blogger.com/profile/05508977663289477701noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-82176183214520591852014-07-14T14:58:06.605+02:002014-07-14T14:58:06.605+02:00Python is the worst language ever. Missing ends an...Python is the worst language ever. Missing ends and }s is a con not a pron. You cannot even define a 2d array. And you missed the best language ever. FORTRAN.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-27488238.post-31659772245627638142013-03-15T08:05:05.711+01:002013-03-15T08:05:05.711+01:00antred: I've heard the same "modern C++&q...antred: I've heard the same "modern C++" argument about "modern Perl", "modern OpenGL", and even "modern PHP".<br /><br />Is there any major piece of software written in this modern C++/Perl/OpenGL/PHP that doesn't suffer from all the problems of non-modern C++/Perl/OpenGL/PHP so I could check it and learn?<br /><br />So far I've been unable to find the "modern non-sucky" versions.tawhttps://www.blogger.com/profile/16972845140253292628noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-18321881768259212232013-03-14T15:41:28.193+01:002013-03-14T15:41:28.193+01:00C++ has its edges and it takes a very long time to...C++ has its edges and it takes a very long time to become a proficient coder in C++, but __modern__ C++ (not the archaic 90s crap you see in most tutorials / books) is actually quite elegant and powerful. Personally I've coded in C, Perl, Tcl, Python, Java, C# and C++, and despite its dark corners C++ is by far my favorite (and Perl my least favorite).antredhttps://www.blogger.com/profile/13471717424499982664noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-162546520734512202012-04-11T18:47:19.810+02:002012-04-11T18:47:19.810+02:00Sir, I liked your post. On the ~70% subset of lang...Sir, I liked your post. On the ~70% subset of languages that we both know, I share 99% of your opinions.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-27488238.post-803424269979253112011-06-20T16:39:34.644+02:002011-06-20T16:39:34.644+02:00In the beginning ( high level language-wise) there...In the beginning ( high level language-wise) there was Fortran and Basic. Fortran was your bread and butter. Basic was for quick and dirty. These two needs have never gone away. The other two facets that have never gone away is the corporate view vs. the personal view. In the corporate view you wrote perfectly understandable code that anyone could copy and use and steal from you because you supported the corporate good even if you got laid off every other year. The personal view compelled you to obfuscate where ever possible to make sure no corporate bosses' jackel relative could take credit for your work, therefore preserving your job place against all political intruders. Ada was supposed to be the answer by "obsoliting" the previous hodgepodge of obscurants. C++ came along and restored the right to obfuscate. Here comes scripting langages, to restore Basic's original purpose. Why do we have all of these languages? Because programmers are like dogs. They have to put their brand on piss on everything in the neighborhood. All you need is a quick and dirty language and a bread and butter language. All languages gravitate toward being all things to all programmers anyway. So don't just pick one ( Ada). Don't let the "Chosen One" be administrated by an agency of the government( the Air Force).<br /><br />So pick the simple one, and leave it alone. Pick the bread and butter one and supply it with sufficient tools to be good for the next 20 years.<br /><br />It used to be spagetti code. It went to spagetti data structures. Now with all the languages,scripts, programmer ego, and esoteric up chuck, we have graduated to language spagetti.<br /><br />Thanks.Swampie777https://www.blogger.com/profile/04879020561397474262noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-30443122723151484382011-05-06T15:55:51.072+02:002011-05-06T15:55:51.072+02:00Don't stick with the name. Maybe it should be ...Don't stick with the name. Maybe it should be named differently. At least Seed7 implements something that works (see below). What name would you suggest?<br /><br />I wrote a map and a filter function with a template (the sort is left out to save space). The template is instanciated for the type integer and the functions are tested with a small integer array. BTW: The map and filter functions have a third parameter, which acts as parameter for the expression.<br /><br />$ include "seed7_05.s7i";<br /><br />const proc: mapFunctions (in type: aType) is func<br /> begin<br /> const func array aType: doMap (in array aType: anArray,<br /> inout aType: aVariable, ref func aType: anExpression) is func<br /> result<br /> var array aType: result is 0 times aType.value;<br /> begin<br /> for aVariable range anArray do<br /> result &:= anExpression;<br /> end for;<br /> end func;<br /><br /> const func array aType: doFilter (in array aType: anArray,<br /> inout aType: aVariable, ref func boolean: aCondition) is func<br /> result<br /> var array aType: result is 0 times aType.value;<br /> begin<br /> for aVariable range anArray do<br /> if aCondition then<br /> result &:= aVariable;<br /> end if;<br /> end for;<br /> end func;<br /> end func;<br /><br />mapFunctions(integer);<br /><br />const proc: main is func<br /> local<br /> var array integer: intArray is [](1, 2, 3, 4, 5, 6, 7);<br /> var integer: number is 0;<br /> begin<br /> intArray := doMap(intArray, number, number+5);<br /> intArray := doFilter(intArray, number, odd(number));<br /> for number range intArray do<br /> write(" " <& number);<br /> end for;<br /> writeln;<br /> end func;<br /><br />The interpreted and the compiled version both write the correct result:<br /><br /> 7 9 11<br /><br />The indentation in the code above seems lost. So you need to re-indent the program. Maybe I send the stuff to Mr. Mertes (and your statement that he does not know what he is doing :-) ).maxTrihttps://www.blogger.com/profile/05549578176403957082noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-65119367910505172592011-05-06T13:04:12.289+02:002011-05-06T13:04:12.289+02:00maxTri: seed7 doesn't have closures. What it c...maxTri: seed7 doesn't have closures. What it calls "closures" is definitely not closures, and nothing on its website indicates the author even understands what closures are, let alone how to implement them.<br /><br />How about you start with defining good old map function which takes array of 'a, 'a -> 'b function, and returns array of 'b. [f(a[0]), f(a[1]), ...].<br /><br />And then filter function which takes array of 'a, 'a -> boolean function, and returns array of only those elements that match the function.<br /><br />And sort function which takes array of 'a, comparison function like ('a, 'a) -> boolean, and returns sorted array.<br /><br />All should work on any type.<br /><br />You don't even need full closures for these simple things, but figuring out these would be a good start.tawhttps://www.blogger.com/profile/16972845140253292628noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-2103750881566623312011-05-06T12:05:17.031+02:002011-05-06T12:05:17.031+02:00Seed7 neither works like Pascal nor is implemented...Seed7 neither works like Pascal nor is implemented like Pascal. It does not follow the mainstream of Java based JIT language clones.<br /><br />You want interesting examples: User defined statements (syntax+semantic), templates implemented with normal functions executed at compile-time, multiple dispatch which uses the same logic as overloading. Seed7 is defined in a library instead of hardcoded in the compiler. So replacing this library could define a different language.<br /><br />It is NOT my FAQ, but the FAQ seems to explain closures used as parameters, viewed from an imperative language.<br /><br />Again, not my FAQ, but I try: The scoping rules seem to be exactly the ones needed to support loop bodies and loop conditions of an imperative programming language. AFAICS it is call by name. What is the big difference between a closure and call by name?<br /><br />I found no lambdas, so probably Seed7 does not need them to implement its closures and its user defined statements.<br /><br />Closures don't work without garbage collection?<br />I am not an expert in functional programming, but AFAICS Seed7s closures seem to work without gabadge collection. Probably they are not the same as the closures from functional programming. OTOH Seed7s closures are similar to functional language closures. And they cannot be described as lazy evaluation, since the evaluation time is determined at compile time.maxTrihttps://www.blogger.com/profile/05549578176403957082noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-16907881458336868572011-05-03T12:11:28.678+02:002011-05-03T12:11:28.678+02:00maxTri: seed7 looks like Pascal, and from examples...maxTri: seed7 looks like Pascal, and from examples you gave I don't see how it does anything interesting. You should invest some time in better examples.<br /><br />And to be honest I doubt seed7 will get anywhere, for example your FAQ indicates you don't really get what closures are.<br /><br />Hints: what are scoping rules here (is this call by name???), where are lambdas, and explain why closures don't work without garbage collection.tawhttps://www.blogger.com/profile/16972845140253292628noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-41946948304248542792011-05-03T08:36:51.558+02:002011-05-03T08:36:51.558+02:00The article concentrates on older languages. I mis...The article concentrates on older languages. I miss many new features. E.g. Multiple dispatch, closures, user defined operator symbols, etc. Language paradigms change over time. A language with extension features can be customized to new ideas. Many languages do some steps in this direction, but the only language that is really syntactically and semantically extensible is Seed7 (http://seed7.sourceforge.net).maxTrihttps://www.blogger.com/profile/05549578176403957082noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-41642611171914434992010-05-17T05:26:16.189+02:002010-05-17T05:26:16.189+02:00how do I get good at programming?how do I get good at programming?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-27488238.post-1955220317935926962010-05-17T05:25:34.980+02:002010-05-17T05:25:34.980+02:00nice post !
I have a question
how to get good at p...nice post !<br />I have a question<br />how to get good at programming???<br />I get enthusiastic about programming but even in the simplest of programs I get stuck at some places and leave it at that.<br />But I want to go in the programming side only as I am Comp. Science student.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-27488238.post-76084329318210817812010-02-04T14:00:44.313+01:002010-02-04T14:00:44.313+01:00What a surprise... looking for information about p...What a surprise... looking for information about programation, and I find a picture of <b>MY CATS</b> in one post about it...<br /><b>¬¬</b>Xtihttps://www.blogger.com/profile/18270565178553798282noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-43886749094997840492010-01-18T02:54:25.771+01:002010-01-18T02:54:25.771+01:00I don't get your problem about "self dise...I don't get your problem about "self disease" in Python. There is no need to name self self. It can also be named 'peter', 'carl' or even 'Chuck_Norris'. You can even mix it, which is big fun if you share code with others... think<br /><br />class Beer(object):<br />..def __init__(peter, s): peter.s = s<br />..def low(carl): return carl.s.lower()<br />..def hi(Chuck_Norris): <br />....return Chuck_Norris.s.upper()<br /><br />if __name__ == '__main__':<br />..b = Beer()<br />..print b.low()<br />..print b.hi()Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-27488238.post-34371602271903989182008-02-05T20:55:00.000+01:002008-02-05T20:55:00.000+01:00As a former Fortran, C++, PHP, and current Python...As a former Fortran, C++, PHP, and current Python and Javascript user that has also played with Java, VB, Foxpro 2.6, Perl and Ruby, some points:<BR/><BR/><B>Fortran</B> (f77; f95 compilers cost money, if you can believe that...)<BR/>I liked the simple syntax, advanced IO/file parsing (try to do in C/C++ or Java something close to Fortran formats; they evolved to parse nuclear data sheets - the first free-form database ever, long before teh XML thingies) and speed; I liked less the white space constraints (reminiscent of punched card days), the way structures are defined (ugly and unreadable), the portability issues<BR/><BR/><B>C++</B> <BR/>I did mostly physics (nuclear interaction simulations and data analysis), and liked it overall ('better C' type of usage, also helped a lot by the neat <A HREF="http://root.cern.ch" REL="nofollow">ROOT</A> toolkit); had I ever touched perversions like the STL, my opinion would have probably been different :)<BR/><BR/><B>PHP</B> <BR/>I like the ease of deployment and good database integration, I like less overcrowded global scope, inconsistency (not only in function naming, also in argument order), the fact that they made php5 into some sort of<BR/><BR/><B>Java</B> <BR/>Liked not having to think about memory management, much better string capabilities than C, extensive library; hated verbosity and huge memory footprint of just about everything.<BR/><BR/><B>VB6</B>: good: clean, simple, fit for quickly churning out Windows GUI apps; bad: tricky deployment (needs runtime installed to work, different versions can conflict, etc...)<BR/><BR/>teh old <B>Foxpro</B> <BR/>I don't remember much of the language (highschool is so far behind!), but I do remember the form wizard, simple syntax, decent database for small apps.<BR/><BR/><B>Ruby</B> and <B>Perl</B> <BR/>similarly expressive, both suffering from the same problem: overuse of punctuation in syntax leads to a lot of noise which I didn't like<BR/><BR/>And now, for the present:<BR/><BR/><B>Python</B> <BR/>good: clean syntax, % (sprintf as it should be), good string and list processing capabilities, decorators, 1st class functions; <BR/><BR/>bad: clumsy unicode handling (it lead to the most interesting bugs that I've produced so far :D), accepts both tabs and spaces for indenting (I am a 'tabs' guy, unfortunately Guido appears to like spaces); only worked with it for the last year or so (as opposed to 2 years Fortran, 3 C++, 5 PHP), I'll surely find more things to hate eventually :)<BR/><BR/><B>Javascript</B> <BR/>actually a very nice language, plagued by the lack of a standard implementation; a while ago, when I set out to learn Scheme, I found it very easy, since I was already used to closures, passing around anonymous functions, redefining functions, building them on the fly... I'm anxious to see the ES4 out with its optional type annotation and some neat things stolen from Python, and I hope to see an implementation that lets me make my own sugar (hygienic macros ftw). <BR/><BR/>What I like less about js/ES3 is the clumsy string manipulation ("+" used for concatenation is both ugly and confusing (concatenation != sum), it has neither string interpolation, nor sprintf, no i18n), lack of encapsulation/modules/namespaces (yes, they can be implemented by hand, Lisp-style, but why?), some other things that I am forgetting now...m0n5t3rhttps://www.blogger.com/profile/15661290674590866639noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-56912959850781381132008-02-01T17:07:00.000+01:002008-02-01T17:07:00.000+01:00benizi: Container sorting and container equality a...benizi: Container sorting and container equality are just some of the bad consequences of string-number unification. Another consequence is inability of indexing Perl hash tables by containers. In Ruby I can do ht[["foo", 5, 3.15]], indexing hash tables by arbitrary objects and arbitrary containers. In Perl there are only some painful workarounds (like stringification of objects, or nested containers).<BR/><BR/>One more bad consequence is having to do all defined($x) instead of $x when checking string data as "0" is false.<BR/><BR/>I don't see how saving a couple of string to int/float conversions is worth suffering that trouble (much more common int/float to string conversion is automatic in Ruby/Python anyway).tawhttps://www.blogger.com/profile/16972845140253292628noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-45631528530990695842008-02-01T16:56:00.000+01:002008-02-01T16:56:00.000+01:00Hmm. I'd argue that your "container comparison" ex...Hmm. I'd argue that your "container comparison" example is a different (but valid) objection. That was one thing I liked when I took Python for a spin.<BR/><BR/><BR/>Nonetheless, I think the 'sort' difficulty is a good justification. Having to write 'sort { $a <=> $b } @data' all the time is pretty annoying.<BR/><BR/><BR/>[For non-Perlers: the default sort is string order. i.e. 'sort @data' is the same as 'sort { $a cmp $b } @data'.]<BR/><BR/><BR/>Supposedly Perl 6's sorting will address the container concern. But, Perl 6 looks like it will be a much different beast in general.benizihttps://www.blogger.com/profile/09698231815816165095noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-13907499279569753832008-02-01T16:38:00.000+01:002008-02-01T16:38:00.000+01:00benizi: In other languages with well-defined equal...benizi: In other languages with well-defined equality/sort order you have container equality, container sorting etc. for free.<BR/><BR/>So you can do something like [["x", 5], ["y", 3], ["x", 11]].sort or ["1", 4] == ["01", 4]. In Perl you cannot do that, you have to use custom code snippets for that every time. That's really too much pain.tawhttps://www.blogger.com/profile/16972845140253292628noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-87155447179163196492008-02-01T16:32:00.000+01:002008-02-01T16:32:00.000+01:00I'm curious as to what you find "braindead" about ...I'm curious as to what you find "braindead" about Perl's string/number auto-conversion. That's one of its strongest points in my opinion.<BR/><BR/>You wrote "only context determines whether "1" and "01" are the same thing". But why is that bad? If I'm treating them as numbers, I'd want them to be ("1" == "01"), but if they're strings, they shouldn't be ("1" ne "01").<BR/><BR/>(I'm definitely biased - Perl is my favorite language. But, I'm honestly curious why you dislike this.)benizihttps://www.blogger.com/profile/09698231815816165095noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-21858201175863152572007-12-22T18:01:00.000+01:002007-12-22T18:01:00.000+01:00Now I feel the need to point something out, compar...Now I feel the need to point something out, comparing a scripting langauge (eg, perl) to a high performance compiled language like C++ is really quite ridiculous. I mean, c'mon, how else am I going to hammer 100k+ triangles per second over the system bus to the video card?<BR/><BR/>It bears mentioning that Perl, Tcl, Ruby, Python, and YES even the Java virtual machine are all implemented in C/C++, for a damn good reason ... there's more to a language than just it's syntax, sometimes you have to get your grubby mits on the actual processer. You know, real hardware? that icky horrible dirty physical silicon that all these pretty interpreters actually have to run on ...<BR/><BR/>That said, I am a total interpreter junkie, (TCL is my reflective dynamo of choice) I just find people's critcisms of C++ utterly off base, I should know, i've written several million lines of C++ ...<BR/><BR/>Use the right tool for the right job I say.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-27488238.post-43792272831004734062007-10-21T06:08:00.000+02:002007-10-21T06:08:00.000+02:00nice post but I donot completely agree with you on...nice post but I donot completely agree with you on this !<BR/><BR/>I have looked at several programming languages.<BR/><BR/>http://www.sharpprogrammer.com<BR/>Advanced Programming Tips TricksSharpProgrammer.comhttps://www.blogger.com/profile/15225373431752034760noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-76425712095858493182007-07-03T19:38:00.000+02:002007-07-03T19:38:00.000+02:00Criticizing a programming language only makes sens...Criticizing a programming language only makes sense if you've got good insight in the language. This kind of insight comes from practice - real working experience - not theory and contrived examples.<BR/><BR/>So, what projects have you finished recently in any of these languages that you write about?Dysmashttps://www.blogger.com/profile/06234046154576035909noreply@blogger.comtag:blogger.com,1999:blog-27488238.post-54918465785401719742007-06-30T20:08:00.000+02:002007-06-30T20:08:00.000+02:00A lot of people are commenting on C++ while they o...A lot of people are commenting on C++ while they obviously don't know it.<BR/>C++ is certainly not about OOP, yet some people still believe it is C with OO capabilities.<BR/>The two good things about C++ are templates and RAII.<BR/><BR/>If you do not master those two aspects, then you cannot even remotely hope to consider yourself a C++ programmer.<BR/><BR/>While I can understand that some people can't grasp meta-programming with templates, resource management through RAII is so important that it's basically horrible to code in C++ if you don't use it.<BR/>That means each resource should be acquired in a constructor and freed in a destructor. Transfer of resources are possible through move semantics or swap functions. Sharing of resources must be done carefully, using refcounting or garbage collection.<BR/>That is to say there is no memory or other resource management that should be done "explicitly". Everything is just bound to scope with RAII.<BR/><BR/>That said, it is well known that C++ is not so good at handling dynamic typing. OOP or static visitors (with boost variant) are basically all you've got.Mathias Gaunardhttps://www.blogger.com/profile/05052622266785164907noreply@blogger.com